Re: Memory Leak in XIB file?
Re: Memory Leak in XIB file?
- Subject: Re: Memory Leak in XIB file?
- From: Jens Beuckenhauer <email@hidden>
- Date: Sun, 05 Oct 2008 07:26:18 +0200
Hello,
I have created a project in that I found a memory leak. The leak
seems to be located in a XIB file?!?
In the XIB file 'MainView' is an ImageView that shows an image file
(TIFF file) that is set via the IB inspector panel. In no way is
the ImageView connected via an outlet or action with any of my
classes. If I delete this ImageView the only memory leak in my
project is gone.
You mention that you've found a memory leak, but not what type of
memory / object that you're leaking. Could you clarify? It would
also be interesting to know how you find memory leaks.
I use Xcode and Instruments to find the memory leaks. I start the
application with "Run with performance tool (leaks)" and check the
leaks instrument. For finding all memory leaks, I try to use to my
applicaion in a way, so that all pieces of my code get called. This
takes a bit of time, but shows me, that my entire code is leak free,
except one leak that will be automatically be generated in the
starting process of the application.
THE LEAK: It is a "GeneralBlock-48", of Event Type "Malloc" in
"libTIFF.dylib". The responsible caller is "setByteArray". The library
and "setByteArray" are not implemented by my self (so it must be Apple
stuff).
And as said: I can comment out all possible things of my code with /*
xxx */ , so that my application has nearly no function and the leak is
there. I can delete every object in IB except for the ImageView and
the leak is also there.
But: If I simply delete the ImageView the leak is gone. Adding another
ImageView also works leak free. But in the moment I set the image to
"mainimage.tiff" via the inspector panel, the leak is back.
And: I checked with a fresh projekt only having an ImageView with an
image. Surely there is NO leak... So it must be something with my
project.
Help would be great, because I don't know what to do...
Jens
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden