CoreGraphics and Foundation iOS memory issues (iPad)

I get strange memory allocations from the main iOS libraries, which are visible in Allocations tools (Malloc 1.00KB), which are constantly growing and cause application crashes (iPad).

The application allows the user to view articles (body in the web view, title / author / date in labels) - a problem that occurs when each new view controller loads (previous view controllers are freed / freed - this is not a problem).

The following CoreGraphics selections occur only when the .text property is set for UILabel: CoreGraphics " CGGLyphBitmapCreate ", " CGFontSetStrikeValue " - sometimes one or both of them are shown 6 or 7 times (1 KB each), but at least one of each time views loading.

In addition to this, " [NSNotificationCenter addObserver: selector: name: object:] " sometimes appears, sometimes not, sometimes up to 6/7 times on a single load. I understand why adding comments may allocate some memory, but, of course, freeing the view manager with " [NSNotificationCenter removeObserver: self] should remove all links again.

I have included screenshots from the tools ... will not even access the WebCore and libcache.dylib allocations that sometimes appear at boot time. It is very confusing here.

Instruments Screenshot 1Instruments Screenshot 2

+4
source share
2 answers

Did you track leaks? As long as this is not a memory leak, you usually do not need to worry.

0
source

Perhaps you have a thread without a pool of autoresists? If so, an autoresist object is created, for example. using the getter method, the object cannot be saved by the pool of autoresists, since it does not exist, and it will leak.
Thus, your application is multi-threaded, make sure that each stream has an @autoreleasepool{} block, which covers most of the stream code.

0
source

All Articles