Page 1 of 1

Loading external assets causes memory bloat

Posted: Wed Aug 20, 2008 5:44 pm
by BGote
We recently started using f-in-box to embed the Flash 9 ocx control into our application. Previously we had purchased the SDK from Macromedia, but it has topped out at version 7 and the artists wanted to use the new design tools that are available in Flash 8+.

Unfortunately, now we are seeing an issue with memory not being released. We saw this in the past, with the Flash 6/7 player. Since we had the SDK, I traced the problem to be that the flash player was not releasing the external resources that we linked in, using the 'Import for runtime sharing' option. So I fixed this by tracking the assets as they were being loaded and forcing the player to release the layer that they were loaded into. I am assuming that the memory problems that we are currently having are something similar to the players inability to release the loaded external resources.

Since we are now using the commercial Flash 9 player, we don't have the ability to alter the source. I have traced through the f-in-box code and I see that I can add a handler for the resources. I see the load call coming in through the ContentManager::BindToStorage which calls the handlers for the resources. But, it looks like I only have the ability to alter where the content stream is loaded from. Does that handler allow me any other control? Could I do something like I did in the past? If I could find out what layer the player is loading the asset into, I could try to force the these layers to unload. Does the information presented to the handlers have the loading level?

Thanks for any information.

Posted: Wed Aug 20, 2008 6:53 pm
by Softanics
Thank you for your question.

Yes, using f-in-box you can provide a content, but the Flash Player decides when to release the provided data.

Thank you.