Thanks all., but still no luck.
I have tried combinations of all the suggestions and still no luck.
Here is some more info on what I am trying to accomplish. I am writing a MySQL driver for AS3 (http://assql.googlecode.com) and I am just trying to work out some memory issues.
Currently all data that is received from MySQL I am storing in a single Buffer (class that extends ByteArray). Then anywhere I need to read data from that Buffer I have a class (ProxiedByteArray) that simply points to that ByteArray and specifies the offset to start reading data from.
I have read countless articles on AS3 garbage collection, dynamic properties and using the delete keyword. However, none of which have helped me.
So, if I load say 20MB from MySQL, in the Task Manager the RAM for the application goes up by about 25MB. Then when I close the connection and try to dispose the ByteArray, the RAM never frees up. However, if I use System.totalMemory, flash player shows that the memory is being released, which is not the case.
Is the flash player doing something like Java and reserving heap space and not releasing it until the app quits?