Re: Memory Leaks and ARC

2014-04-23 Thread Dave
On 23 Apr 2014, at 00:18, Quincey Morris quinceymor...@rivergatesoftware.com wrote: On Apr 22, 2014, at 15:18 , Dave d...@looktowindward.com wrote: I assumed that ARC would release myImage on each interation of the loop, however, this seems not to be the case The ‘myImage’ variable

Re: Memory Leaks and ARC

2014-04-23 Thread Quincey Morris
On Apr 23, 2014, at 03:01 , Dave d...@looktowindward.com wrote: If I changed the names of commandDownloadImageWithFileURLString to be newCommandDownloadImageWithFileURLString, this would cause it to release myImage on each iteration rather than using Autorelease? It would remove one — and

Re: Memory Leaks and ARC

2014-04-23 Thread Dave
Hi, Yes, I realize that. But in this case, the root object obeys the new/alloc rule. it’s complicated because this App is a meld of 3 apps all developed at varying times. In this case, there was an old-school network manager, that used manual MM. This was kept like that (by switching off ARC

Memory Leaks and ARC

2014-04-22 Thread Dave
Hi, I’ve been profiling my App for a while now. I have a test class that reads a lof of data from the server, including downloading images. The test runs on a background thread and is started by clicking a button inside a view controller. Although the test read a lot of data, it does’t retain

Re: Memory Leaks and ARC

2014-04-22 Thread Keary Suska
On Apr 22, 2014, at 4:18 PM, Dave wrote: This is the main loop of the mainstay of the allocations, it runs this loop around 650 times loading images of varying sizes: myCount = [myURLArray count]; LogIfDave(@myURLArray: %@ Count: %i,myURLArray,myCount); for (myIndex = 0;myIndex

Re: Memory Leaks and ARC

2014-04-22 Thread Quincey Morris
On Apr 22, 2014, at 15:18 , Dave d...@looktowindward.com wrote: I assumed that ARC would release myImage on each interation of the loop, however, this seems not to be the case The ‘myImage’ variable gives up *ownership* of the previous image object when you create a new one in the loop, but

Re: Memory Leaks and ARC

2014-04-22 Thread Varun Chandramohan
Hi Guys, Since we are on the topic I noticed something interesting in my code. My development environment is 10.9.1, and when ever I run ³leaks² command to check for memory leaks I get none. It seems pretty clean. However when I run the same code in older OS 10.7.x and run leaks there I noticed

Re: Memory Leaks and ARC

2014-04-22 Thread Jens Alfke
On Apr 22, 2014, at 6:38 PM, Varun Chandramohan varun.chandramo...@wontok.com wrote: However when I run the same code in older OS 10.7.x and run leaks there I noticed big dump of leaks and my daemon (runs without a UI) has numerous _NSCFString autoreleased with no pool in place - just

Re: Memory Leaks and ARC

2014-04-22 Thread Greg Parker
On Apr 22, 2014, at 6:49 PM, Jens Alfke j...@mooseyard.com wrote: On Apr 22, 2014, at 6:38 PM, Varun Chandramohan varun.chandramo...@wontok.com wrote: However when I run the same code in older OS 10.7.x and run leaks there I noticed big dump of leaks and my daemon (runs without a UI) has

Re: Memory Leaks and ARC

2014-04-22 Thread Varun Chandramohan
That makes sense. I am now able to see the issue after setting OBJC_DEBUG_MISSING_POOLS=YES. My original code was using CoreFoundation extensively and I introduced Foundation APIs recently. I think this issue got introduced after that. Since this is non-cocoa application (daemon), what I have is