Re: Releasing after -getBitmap -- memory not recovered?
Re: Releasing after -getBitmap -- memory not recovered?
- Subject: Re: Releasing after -getBitmap -- memory not recovered?
- From: Darrin Cardani <email@hidden>
- Date: Fri, 17 Oct 2008 09:30:54 -0700
On Oct 16, 2008, at 5:27 PM, Matt Rhodes wrote:
Two questions:
1. Is there a way to check that an Image Well has a bitmap/texture
without calling -getBitmap or -getTexture? I only need to check if
it's empty.
I don't know of any way to do that. If it is empty, -getBitmap and -
getTexture return nil, as I'm sure you know. If it's not empty, you're
eventually going to want to use the image, right? You could just keep
it around until you need it. I guess I don't understand why you'd want
to check if it's empty then not use the image it returns if it's not
empty.
2.
I'm tracking down a memory leak in some software and I've found that
if I watch
the before and after memory usage during a -getBitmap and -release
<bitmap>,
I don't seem to recover everything allocated by -getBitmap.
If a call to [parmsApi getBitmap:myMap ...] increases memory usage
by 5 Megs, should I expect
my 5 Megs back if I immediately call [myMap release]?
Has anyone else had memory issues with -getBitmap?
I'm running Motion v3.0.2.
Motion will keep around some image-related data until rendering is
done. For textures, it's not a lot of data, but for bitmaps, it is.
But then, your users probably have significantly more system RAM than
VRAM, so it's usually much less of a problem.
I'm watching usage with Activity Monitor (probably not the best way
to watch memory,
but I do see my internal image memory being released back properly).
You can also try the Leaks tool. In Xcode under the "Run" menu is the
option "Start with Performance Tool," which has "Leaks" in the submenu.
Darrin
--
Darrin Cardani
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Pro-apps-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden