site_archiver@lists.apple.com Delivered-To: pro-apps-dev@lists.apple.com Hi Matt, On Oct 17, 2008, at 11:33 AM, Matt Rhodes wrote: 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/pschneider%40apple.com _______________________________________________ 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... I believe you can quickly check to see if an image parameter is empty using the FxTimingAPI. -durationOfImageParm: will return kFxDuration_Undefined if the parameter is empty. It's not the most intuitive, but it should be faster than grabbing the image. /*! @method durationOfImageParm:forEffect: @abstract Returns the duration of the clip assigned to the given image parameter for the given effect. @param parmId The ID of the image parameter. @param effect The plug-in object. @result The clip's duration, expressed in timeline frames, or the special value kFxDuration_Undefined if the image is empty. */ - (double)durationOfImageParm:(UInt32)parmId forEffect:(id<FxBaseEffect>)effect; 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. Thanks. I was able to do enough testing to rule out the Map get/ release. This email sent to pschneider@apple.com This email sent to site_archiver@lists.apple.com