The documentation makes clear the importance of releasing media objects if they are loaded several times. Quote:
"if you make multiple calls to load image or load sound and don’t release the image (or movie, or sound), your application memory usage will increase. "
There is always reference to deleting the image and thus reducing its retain count. The problem is, how can you tell if the object has truly been released? I`ve spent literally several hours today trying to find a way to determine if a loaded movie file that I deleted had actually been released, but I got nowhere.
First, I tried every conceivable way of trying to get the retain count of an object before and after being deleted to see if it had changed, but AppleScript Studio doesn`t seem to recognize the “retain count” command. (ex. set RetainCountVar to the retain count or movie… etc.)
I also tried analyzing a movie file’s id number before and after being deleted, but the id number doesn`t change. (I figure this makes sense seeing that the actual file is, of course, still there. It has simply been (hopefully) released.)
So, how can you determine if a media file (song, photo, movie) has truly been released after releasing it (with a delete command) in the script?
Any help, as always, would be greatly appreciated.