memory problem, advice needed
memory problem, advice needed
- Subject: memory problem, advice needed
- From: Paul Gribble <email@hidden>
- Date: Sat, 01 Apr 2006 00:11:25 -0500
- Thread-topic: memory problem, advice needed
I have an app that when the user clicks the "GO" button, a for-loop is
initiated (in a thread) and each run through the for-loop, a function
myFun() is called (not a method, a traditional C function).
within myFun(), are several object creation calls, e.g.
NSArray *myArray = [NSArray arrayWithObjects: myObj1, myObj2, nil];
where myObj1, ... etc are arrays themselves, also defined within myFun().
When I examine the memory footprint as the for-loop progresses, I notice
memory being eaten up continuously at a rapid pace. When I comment out these
object creation lines of code in myFun() and rerun the for loop the memory
issue goes away.
This leads me to believe that when myFun() is called each time in the for
loop, the objects that are created within myFun() are not being released.
I've tried putting [myObj1 release]; [myObj2 release]; ... [myArray
release]; at the end of myFun() but that doesn't seem to help.
Any suggestions? Does this interact with the fact that myFun() is being
called by a method that itself is launched using a thread?
Thanks,
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden