Share on Google+Share on Google+

Java Coder
iphone memory management
1 Answer(s)      5 years and 9 months ago
Posted in : MobileApplications

I am confused with the memory management issue in iPhone. I do not know which variable need to release?

Ads

View Answers

July 27, 2011 at 4:27 PM


I guess you need to release variables only which you assign using alloc.

For eg:

// string1 will be released automatically
NSString* string1 = [NSString string];

// must release this when done
NSString* string2 = [[NSString alloc] init];
[string2 release];

Hope it helps,

-Dinny










Related Tutorials/Questions & Answers:
iphone memory management
iphone memory management  I am confused with the memory management issue in iPhone. I do not know which variable need to release
Memory Management
Memory Management  how can we manage memory in iphone development???   hello, you can read all the memory management rules from http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/MemoryMgmt
Advertisements
memory management
memory management  memory management in java
memory management
memory management  Why objects store in heap
memory
memory  what is memory
Memory
Memory   what is the different between heap memory and stack memory ? please explain with example
memory
memory   hi i am jane pls explain the difference between heap memory and stack memory
Objective-c memory management: retain and release
Objective-c memory management: retain and release... the Foundation framework deals with memory management when you create classes... how to manage memory with language Objective-C. Programmer can allocate memory
Memory - Java Beginners
Memory management in Java  Where are these Heap and Stack? Is there size fixed? what is core area in memory
iphone
iphone  hiii, how can we use table recursively in iphone
iphone
iphone  How can connect with the other database in iphone application(like... MYsql or oracle) is this dirctly possible
iphone
iphone  hello... i want to make first iphone application . How can i make it plz help me
Phantom memory
Phantom memory  What is phantom memory
Phantom memory
Phantom memory  hello,, What is phantom memory
iphone - EXC_BAD_ACCESS
, this types of error occurs when memory management is not done properly...iphone - EXC_BAD_ACCESS  What cause this "iphone - EXCBADACCESS... and allocation is given for it. But somehow you forget to release it's object from memory
memory allocation
memory allocation  If we assign memory malloc(5) and access more than the assigned memory then what will happen? 1.segmentation error 2.memory leak 3.program will not compile 4.Your view
memory layout
memory layout  how much space does each segement(data,stack,heap,static) holds in memory? memory here refers to ram or hard disk
Management
Management  Hi, Can anyone give me full details of Management? Thanks   Hi, Please see the thread What is management? Thanks
heap memory
heap memory  how long is the object stored in heap memory persist
GeneralBlock Memory Leak
GeneralBlock Memory Leak   Hi all, I'm testing my iPhone application using instrument test in XCode 4... but on every test it throws a GeneralBlock... to debug this kind of memory leaks in iPhone instrument test
Sitemap iPhone Tutorial
Inheritance | Dynamic Types in Objective-C | Objective-c memory management... iPhone | Objective C Tutorial | Objective C Introduction | Why... C on Mac | Compiling Objective C | iPhone Application Development
iphone
† improves ¬† the ¬† code ¬†management. ¬† All ¬†screens ¬†must ¬†comply ¬†to ¬
NSZombieEnabled iPhone
NSZombieEnabled iPhone  NSZombieEnabled Trouble in setting How can i set the NSZombieEnabled in iPhone application to track unmanaged memory
Memory Allocation
Memory Allocation  What Is The Order Of Execution Of Statement 1) Statement Enclosed in {}. 2) Static 3) Public Static Void Main()   When jvm loads a class, static block is executed first, then main method. And at last
memory allocation
memory allocation   class Bird { { System.out.print("b1 "); } public Bird() { System.out.print("b2 "); } } class Raptor extends Bird { static... of execution of statement ? memory allocation ?  The code uses static
Java memory leak
Java memory leak  What is memory leak
Hire iPhone developer
, Xcode IDE, Interface Builder, Instruments Testing, Memory Management...Hire iPhone developer - Hire iPhone developers in India Apple?s iPhone is superior to all smart phones but developing applications for iPhone is not an easy
Creating a memory leak with Java
Creating a memory leak with Java  Creating a memory leak with Java
Finally Apple Unlocks the Bluetooth Features on iPhone
such as the lack of extendable memory on their iPhone or the missing measly floppy drive on the iMac. While the iPhone is simply a great gadget it lacked certain basic... Finally Apple Unlocks the Bluetooth Features on iPhone
heap and stack memory
the difference between heap memory and stack memory   STACK memory is referred as temporary memory,if you come out of the program the memory of the variable will not no more there.[eg., int a; memory for a will not maintained
iPhone News
feature in iPhone Mac launched the popular version of money management software... idiosyncrasies such as the lack of extendable memory on their iPhone or the missing... iPhone News and Updates   
Tutorials   
Java Spring Hibernate Struts Training How to uninstall old version of Android Studio? How to install cocoapods in Max? item lookup How to get path of a file in iOS? [NSConcreteMutableData release]: message sent to deallocated instance Covert Bool to String - NSString Getting UIButton by Tag How to write Example code for comparing Strings in iPhone SDK? How to set placeholder in uitextfield programmatically? Example code of adding placeholder in UItextFeild how to get UIView by tag J2me image use ase smiley UILineBreakModeWordWrap is deprecated Framework for Mobile Applications How to print UIButton id System/Library/Frameworks/UIKit.framework/Headers/UIViewController.h' has been modified since the precompiled header UINavigationController Navigating to back uinavigationcontroller add right button UINavigationController how to set title uitextfield hide keyboard on return dismissmodalviewcontrolleranimated first deprecated in ios 6.0 xcode 6.1.1 download How to remove virtual keypad from apps java How to remove virtual keypad from apps java How to remove virtual keypad from apps java code to send sms alerts using jsp online iphone app development how to devlop mobile application? What is WAP? download mp3 file on server in iphone home button macbook pro keyboard calling from iphone through programitically in iphone How to retrieve a field from SQLite to Edittext in android How to retrieve a field from SQLite to Edittext in android Sqlite3 Why NSMutableDictionary ios work with nsdictionary what is class methods in objective c what is class methods in objective c UIButton HOW TO FIND OUT GPS COORDINATES WITHOUT USING ONLINE DATABASE OR OTHERTHING ON MOBILE HOW TO FIND OUT GPS COORDINATES WITHOUT USING ONLINE DATABASE OR OTHERTHING ON MOBILE HOW TO FIND OUT GPS COORDINATES WITHOUT USING ONLINE DATABASE OR OTHERTHING ON MOBILE Rad Calculator ANDROID J2ME Bar graph j2me image application iphone iphone

Ads

 
Advertisement null

Ads