Another memory leak for iphone requires help. Look for tips on the next steps.

I hate a memory leak and tend to be proud of blah, blah, blah. Help!

The leaks that I have are not crazy big (a few K per max), but I want to remove them for sure. There are two categories of leaks, and I have some screenshots of each of the Instrumental Leaks tools.

Firstly, it’s just an odd Java / Web thing that happens within 10 seconds of starting my application: no matter which branch of code I take. It is similar to what is happening in the background that causes it. I have a sample code from reputable authors of iPhone programming, and they do the same, so I'm not too worried about the 64 bytes that I lose during my application launch. This leak will occur long before I create any of my web forms, such as MapKit tools, such as reverse geocoder ... but I will use them later in my code.

The second, however, is insidious, and I feel like a fool for not being able to track her ... because it happens so SIMPLE. All I do is create a UITextField in Interface Builder and use it, like at any other time I have ever done before. This happens on any UITextField that I create whenever an iPhone pops up a virtual keyboard. And, memory leaks are quite significant (hundreds of bytes at a time); presumably from graphics related to creating on-screen buttons.

So, to be clear, when I touch any of these text fields, a virtual keyboard appears and I skip a few hundred (or more) bytes. I don’t even type anything, assign any variables, etc. This only happens the first time a virtual keyboard pops up on a text field, by the way. (So ​​my leaks are "somewhat restrained.") (What did they say about the recent oil well, eh?)

You ask what is different from the controller that owns these UITextFields. The only thing I can think of is that it is a dynamically created UIViewController, which is controlled by the UINavigationController.

, , . XCode, , .

, , . ( , ..)

"".

, , . .

Memleak 2:

-Pete

P.S. Xcode (3.2.3) 4.0.2 iOS.

+3
1

, , , , . , .

, , . , :

  • JavaScriptCore
  • WebCore
  • GraphicsServices

, , .

:

: 240 (0,23 ).

, : P

+2

Source: https://habr.com/ru/post/1759714/


All Articles