Share on Google+Share on Google+

Deepak Kumar
UIImage imagenamed memory leak
1 Answer(s)      6 years and 2 months ago
Posted in : MobileApplications

Hi,

Following code is creating memory leak:

UIImage * img1 = [UIImage imageNamed:@"myimage.png"];

I have to replace existing image with new image.

What could be the possible solution?

Thanks

Ads

View Answers

February 2, 2011 at 8:30 PM


Hi,

In my application i crated 4 UIImageview in .xib file and then hide and displayed the image using following code:

myButton.hidden=YES; //for hiding

and

myButton.hidden=NO; //for displaying

Thanks










Related Tutorials/Questions & Answers:
UIImage imagenamed memory leak
UIImage imagenamed memory leak  Hi, Following code is creating memory leak: UIImage * img1 = [UIImage imageNamed:@"myimage.png"]; I have to replace existing image with new image. What could be the possible solution? Thanks
Creating a memory leak with Java
Creating a memory leak with Java  Creating a memory leak with Java
Advertisements
Java memory leak
Java memory leak  What is memory leak
NSMutablestring memory leak
NSMutablestring memory leak  Why i am getting the nsmutablestring memory leak "NSCFString" leak
Memory leak in While loop
Memory leak in While loop  How to manage a memory leak in While loop ?   make sure loop is not running infinitley. ------------------------------------ Chandraprakash Sarathe http://javaved.blogspot.com/   
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
Java Memory Leak - Java Beginners
Java Memory Leak  I am having a memory leak in my java version of the game Snake. I have narrowed the exact step of when the program memory.... The actually object that's eating up my memory is an array of ints which grows
solutions for memory leak of dicom images when using ImageIO library.
solutions for memory leak of dicom images when using ImageIO library.   I am utilizing ImageIO.write(). Out of memory error. please don't recommend System.gc(); for optimizing the memory usage
UIImage from file
provide me code for uiimage from file. Thanks   HI, You can use following code: myImageView.image = [ UIImage imageNamed:@"image.png" ]; Thanks...UIImage from file  Hi, I have added an png image to my project. Now
Resource Leak
Resource Leak  What Is Resource Leak
memory
memory  what is memory
uiimage initwithdata example
uiimage initwithdata example  I need uiimage initwithdata example UIImage *img = [[UIImage alloc] initWithData:data
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
Load UIImage from URL
Load UIImage from URL  Load UIImage from URL
How to add UIImage on pin location MKMapKit
;pinannotation.image = [ UIImage imageNamed:@"image.png...How to add UIImage on pin location MKMapKit  Hi, In my application, i need to add a custom image on MapView controller instead of pin. I am calling
Potential leak of an object XCode
Potential leak of an object XCode  What is potential leak of an object XCode
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
UIImage width and height
UIImage width and height  Hi, How I can find the width and height of UIImage object. Let's know an example code for finding UIImage width and height. Thanks
java connection leak
java connection leak  How to check the connection leak in Java
Objective C resize UIImage
Objective C resize UIImage  i just want to resize the image on the touch detection. That means if a user double clicks on the UIImage it must resize the image
save uiimage to photo library
save uiimage to photo library  How to saved the clicked picture...; Save UIImage to photo library Creating a camera application in iPhone need... image from info dictionary UIImage *image = [info objectForKey
Java memory optimization
be a change of memory leak in your program. You can use memory debugger...Java memory optimization  When you think about optimization, what is the best way to find out the time/memory consuming process?  Hi
[UIImage isKindOfClass:]: message sent to deallocated instance
[UIImage isKindOfClass:]: message sent to deallocated instance  Hi, I am getting following error: -[UIImage isKindOfClass:]: message sent to deallocated instance How to resolve the issue? Thanks
memory management
memory management  memory management in java
memory management
memory management  Why objects store in heap
Phantom memory
Phantom memory  What is phantom memory
Phantom memory
Phantom memory  hello,, What is phantom memory
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
heap memory
heap memory  how long is the object stored in heap memory persist
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
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