0

I'm using instruments to tracking memory usage. Heapshot Analysis is awesome, but I also found some "non-object". what's this? kind of abandoned memory or something else ? How to solve this ?

Heap shot image

Another Question may relate, I used to use [myObj release], myObj = nil; myObj = [[MyObj alloc] init];

to release object and create a new one. (myObj = nil, just for avoid crash) Some guy said, It may waste memory performance. Is he right? I want to know some details. Very appreciate for your help.

TK189
  • 1,490
  • 1
  • 13
  • 17

1 Answers1

0

Your question has an answer here: What does <non-object> in Allocation "heapshots" mean?

For the memory management there's absolutely nothing wrong in your code. myObj = nil is pointless because you're allocating a new object in the line after it.

Community
  • 1
  • 1
Valerio
  • 513
  • 2
  • 14