Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Duke Leto

macrumors regular
Original poster
Mar 17, 2008
166
0
When I deal with numbers (floats, ints, etc.), I feel like there is nothing that I can do to get rid of the memory they are using. Is there a way to deal with things like CGRects, CGPoints, floats, ints, etc?
 

firewood

macrumors G3
Jul 29, 2003
8,141
1,384
Silicon Valley
If the numeric stuff is stored in local variables, they are commonly on the stack (or possibly in registers), and will automatically be cleaned up when the subroutine exits. If they are global variables, they are in the process heap, and will automatically be cleaned up after the app is terminated.

If you have pointers to (re)malloc'ed numeric arrays, you may have to clean those up manually to prevent leaks.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.