dealloc

Removing all traces of a UIView

Heya folks! I've got another question. I've got this NavigationController, which has a delegate: MainViewController. In this navigation controller, there's a table view, which has the same delegate: MainViewController. Whenever I press a row in the table, a view pops up called: itemViewController. Now, this all works really great. But ...

How to fix strange retain count (1 init - 3 retaincount)? + edit: dealloc problem

So my code goes like this: ArticleControllerController *ac = [[ArticleControllerController alloc] init]; ac.categoryIndex = idx; NSLog(@"acc retain: %d", [ac retainCount]); [app.nav pushViewController:ac animated:NO]; NSLog(@"acc retain: %d", [ac retainCount]); [ac release]; NSLog(@"acc retain: %d", [ac retainCount]); ...

dealloc without alloc?

How is it possible that I have a dealloc without having an object allocated? Please see the log when switching from the MAIN view to the RSSItem view. The 0xdd5adf0 memory gets deallocated, but I can't find where it was allocated. Thanks for any input. ps: self (null) is from trying to print one of the properties of the 0xdd5adf0 obje...

Calling dealloc in init?

I am writing a framework and I have an object with a custom init method: @implementation OSDatabase @synthesize database; // MEM - (void)dealloc { sqlite3_close(database); [super dealloc]; } // INIT - (id)initWithDatabasePath:(NSString *)path error:(NSError **)error { if (self = [super init]) { if (!sqlite3_open_v2([path UT...

Memory leak in a small code with dealloc

Hi All! Assist me please, is this code correct? I mean, do we really need a dealloc method in this class, and why do or don't we? Will be a memory leak if we don't use dealloc here? Thanx! #import <Foundation/Foundation.h> @interface MyData : NSObject { @private NSString *name; NSString *surname; NSString *email; ...

How to make sure your dealloc code is called on application termination?

According to NSObject's documentation: Important: Note that when an application terminates, objects may not be sent a dealloc message since the process's memory is automatically cleared on exit --- it is more efficient simply to allow the operating system to clean up resources than to invoke all the memory management ...

how to avoid that callback is sent to deallocated instance

The following process leads to a crash of my app: the user opens a view and a request is send to the server the request is executed in background the user navigates back to the root view the request has been finished and the following code is executed // MyDatasource.m // e.g. in connectionDidFinishLoading [callback loaded...