Can I control the memory limit (i.e. when GC has to run) in my Flex application?
+1
A:
not 100% sure, but I think the answer is no. Take a read of this article
Simon
2009-02-18 10:29:12
The article says nothing about memory limits
Assaf Lavie
2009-02-18 10:30:49
no, but it does speak about how the garbage collector works in the Flash player, which is where your flex application will be running...
Simon
2009-02-18 10:35:42
yes, thanks. I'm familiar with Flex's GC, I'm just asking about how to configure it.
Assaf Lavie
2009-02-18 12:02:34
Flex doesn't have its own GC, it belongs to the Flash Player VM. Flex is just a framework for writing Flash apps. I think you're looking in the wrong place.
Simon
2009-02-18 12:22:27
So it there a way of controlling the GC memory limit in Flash?
Assaf Lavie
2009-02-18 13:46:35
goto original answer...
Simon
2009-02-18 14:01:04
A:
I don't think so. That is probably a parameter of the flash player based at the client, and I assume it is also dependant on the exact resources the client machine has, i.e. more RAM means less frequent gc, etc.
David Hanak
2009-02-18 10:30:20
+3
A:
Check out the flash.system.System class. The "totalMemory" property will show you (in bytes) how much memory the current application is using. Calling System.gc() will run a GC. You could use a Timer to periodically check totalMemory and then preform gc if it exceeds a threshold. More info:
http://livedocs.adobe.com/flex/3/langref/flash/system/System.html
cliff.meyers
2009-02-20 07:13:16
A:
George Profenza
2009-04-14 23:38:26