dealloc Questions

6

Solved

I would like to perform some cleanup at the end of a view controller's life, namely to remove an NSNotificationCenter notification. Implementing dealloc results in a Swift compiler error: Cannot o...
Thoracotomy asked 26/8, 2014 at 4:12

5

Solved

Looking at various Apple examples (for example Add Music) in which I see they add observers to the default NSNotificationCenter in viewDidLoad, then remove them in dealloc. This seems dangerous as ...
Leilanileininger asked 26/4, 2012 at 12:13

3

Solved

I added an observer in the code and then removed it in dealloc and viewWillDisappear but still i am getting an error stating *** Terminating app due to uncaught exception 'NSInternalInconsisten...
Morry asked 5/6, 2016 at 9:36

3

Solved

When I use -addObserverForName: object: queue: usingBlock: for NSNotificationCenter in the -viewDidLoad: method of my view controller, the -dealloc method ends up not being called. (When I remove...
Bigamous asked 2/10, 2012 at 22:9

2

Solved

When try to encode my custom object in iOS swift get this error from Xcode 8.3 unrecognized selector sent to instance 0x60800166fe80 *** -[NSKeyedArchiver dealloc]: warning: NSKeyedArchiver dea...
Unerring asked 17/4, 2017 at 6:6

1

I'm trying to create a retrying mechanism for our network calls. I have created 2 classes. One a retry Class and another a Manager in case I wanted I can cancel all classes. class Retry { var url...
Deutero asked 10/4, 2017 at 21:41

1

In Clang's Objective-C Automatic Reference Counting we see the following For __weak objects, the lvalue is updated to point to the new pointee, unless the new pointee is an object currently unde...

1

Solved

Following this question, and more specifically, this comment: because retain (aka strong reference) cycles in the common case where the timer's target is also its owner I am wondering why deal...
Geist asked 1/11, 2016 at 10:54

4

Solved

I am using Qt5 on Windows7 and I recently found an interesting Qt example code. Basically, it looks like this: ButtonWidget::ButtonWidget(const QStringList &texts, QWidget * parent) : QWid...
Silsby asked 18/4, 2016 at 17:34

1

On client phones rarely can be replicated crash during camera dealloc Fatal Exception: NSRangeException Cannot remove an observer <AVCaptureSession 0x174212170> for the key path "changeSeed"...
Telophase asked 10/4, 2015 at 19:21

1

I'm wondering if I've somehow stumbled upon a bug where swipe to delete UITableViewCells don't ever deallocate when their UITableViewController does. I've added a -dealloc method into my custom ta...
Muffler asked 3/12, 2015 at 0:48

6

Solved

I have tested my all viewControllers dealloc methods. And all of them getting called properly on calling popViewControllerAnimated. But only 1 controller's dealloc method not getting called. I am ...
Accumulate asked 24/2, 2012 at 13:49

2

Solved

In iOS, I pop from current viewController into previous one, but it doesn't go into dealloc. Is this because there is another pointer pointing towards the current viewController, either in a diffe...
Cosimo asked 30/4, 2014 at 13:7

0

I've been struggling on this for a while now, but I wasn't able to find a solution: I've got an iOS 9 app that supports all device families, uses size classes and is programmed with Swift 2.0. I'm...
Loincloth asked 20/10, 2015 at 14:0

2

Solved

My project is a hybrid static lib for showing a UIWebView with some JS to control the logic. When I use 64bit and run demo on iOS 8/iPhone 6, the memory keeps going to 30M or more! When I use gen...
Aerotherapeutics asked 9/2, 2015 at 1:47

2

Solved

First off: My project is ARC enabled and I'm using storyboard. I have a view controller that pushes a segue (modal), [self performSegueWithIdentifier: @"goInitialSettings" sender: self]; ther...
Grounder asked 11/8, 2014 at 14:11

1

I got some crash reports in crashlytics which I don't understand at all, here's the crash log of the thread that crashed: I don't find any hints to my code, nor is it something reproducable or o...
Showily asked 27/4, 2015 at 20:10

5

Solved

I have a method called in various places called "cancelAllPendingDownloads" This is a general method that cancels various jobs and updates internal counters. Problem happens when it is called with...

1

Hi I am playing video on my UITableViewCells using AVPlayer, It was working fine on iOS 7, but in iOS8 it crashing with following error. 'An instance 0x7c01b000 of class AVPlayerItem was dealloca...
Radnorshire asked 8/1, 2015 at 10:53

3

This is a new problem I have been having ever since I've been updating my app for iOS 7. Everytime I launch the app on my device or simulator, I get this error code RecipeDetailViewController scr...
Cloth asked 13/9, 2013 at 5:7

1

Solved

For example if I were to write this code: var t = time_t() time(&t) let x = localtime(&t) // returns UnsafeMutablePointer<tm> println("\(x.memory.tm_hour): \(x.memory.tm_min): ...
Shocking asked 1/9, 2014 at 12:15

2

Solved

In my main scene I create 4 walls with this method: -(void)createFirstWalls{ CGFloat maxY = CGRectGetMaxY(self.frame); Wall* wall1=[Wall wallWithRect:self.frame color:[self randomColor] positio...
Soerabaja asked 19/8, 2014 at 14:5

1

Solved

I have an object a1 of class A, I want to find all the objects that hold a strong a reference to the object a1. Is there a way to do it? The reason I want to know this is because, a1 doesn'...

3

Solved

I have spent some time debugging a weird issue with ARC and custom dealloc functions. I'm subclassing NSOperation class I set completion block for this operation The operation is referenced by a ...

4

Solved

Here is my situation. It's complicated so bear with me. I have a view class, let's call it MyView. It creates a loading indicator subview, and then starts a background operation that will load dat...
Apparitor asked 24/4, 2011 at 7:46

© 2022 - 2024 — McMap. All rights reserved.