Objective c: How to use memory managment properly for asynchronous methods
        Posted  
        
            by user296446
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by user296446
        
        
        
        Published on 2010-04-23T12:50:45Z
        Indexed on 
            2010/04/23
            12:53 UTC
        
        
        Read the original article
        Hit count: 223
        
I need to call a method that starts some asynchronous code
MyClass* myClass = [[MyClass alloc] init];
[myClass startAsynchronousCode];
Now I cant simply release it as this would cause an error since the code is still running:
[myClass release];  // causes an error
What is the best way to deal with the memory?
© Stack Overflow or respective owner