Re: Releasing after -getBitmap -- memory not recovered?
site_archiver@lists.apple.com Delivered-To: pro-apps-dev@lists.apple.com Thanks. I was able to do enough testing to rule out the Map get/release. m _______________________________________________ Do not post admin requests to the list. They will be ignored. Pro-apps-dev mailing list (Pro-apps-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/pro-apps-dev/site_archiver%40lists.ap... 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. It's a speed issue. There happens to be a situation where we only need to see what's populated (and we don't care what's in there). Not a big deal - just noticed it during my "where am I allocating memory and why" search. 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. This email sent to site_archiver@lists.apple.com
participants (1)
-
Matt Rhodes