ios - Memory management in Xcode -


i try allocate , release mutable array in xcode

nsmutablearray *inventory = [[nsmutablearray alloc] init];

[inventory addobject:@"one"];

[inventory release];

does me explain why after "inventory" released, still store 1 objects?

assuming working without automatic reference counting (arc):

when release object, marks memory object occupying free. however, not destroy in memory.

if try (improperly) access @ array's memory address, may find array members still there. warned, not safe, , array , members can (and will) overwritten @ time.

you should use arc production code avoid dangers of memory mismanagement. works well.


Comments

Popular posts from this blog

how to do line continuation in perl debugger for entering raw multi-line text (EOT)? -

javascript - Create websocket without connecting -

sharepoint - Accessing files across a shared directory using a Windows service -