force process to release memory

Hey everyone! I've got a pretty big problem with our application that we're releasing in a couple weeks. The app is developed with Flash and Java, and the problem is that the Flash Player gobbles up OS memory and then never releases it back to the OS...it just keeps gobbling it up getting larger and larger. I found a command line utility for the PC that allows you to target the process running and force it to release it's un-used memory back to the OS. But we also are releasing our product for Mac OS X and need to find a way to achieve this on the Mac as well. Does anyone know of a way using a utility or AppleScript/Shell script to make this happen? Thanks a ton for any advice on this!

-Jason Kringen
[EMAIL=[/EMAIL]

Jason,

First off welcome to Unix.com. Secondly please read the rules, and don't post your email address to, this is to avoid email abuse, and for other security reasons.

I have a quesion with regard to your original question. In this application, do you create multiple instances of the flash player from within a main java application, for example each time a new flash item is opened?

If this is he case then it is more likely than not that the problem lies within the main code, not correctly finalizing objects. That being said you may have better luck by using the extended options, such as agressive heap in java. Do java -X to get the list of extended options.

This is actually a known issue with the Macromedia Flash Player. We've been talking to there engineers about this and they acknowledge it but have no solution. So our only hope is to force that flash player's process to release it's un-used memory. The PC has a really nice command line utility to do this, but the mac has nothing it appears. I've even talked to apple directly and they were no help. So I'm hoping someone on here can tell me how to write an OS level script that do accomplish the same result of forcing an app. to release it's memory. Any ideas are great at this point. Thanks! :confused: