iphone memory leaks and malloc?
- by Brodie4598
Okay so im finally to the point where I am testing my iPad App on an actual iPad...
One thing that my app does is display a large (2mb) image in a scroll view. This is causing the iPad to get memory warnings. I run the app in the instruments to check for the leak.
When I load the image, a leak is detected and i see the following in the allocations:
ALl Allocations: 83.9 MB
Malloc 48.55 MB: 48.55 MB
Malloc 34.63 MB: 34.63 MB
What im trying to understand is how to plug the leak obviously, but also why a 2MB image is causing a malloc of 20x that size
I am very new to programming in obj-c so im sure this is an obvious thing, but I just cant figure it out. Here is the code: