Slow memory cleaning: Error #3691: Resource limit for this resource type exceeded

Software: Away3D 4.x

Thekeeper, Newbie
Posted: 14 November 2013 09:31 AM   Total Posts: 1

Hello!

I’m working on an application that loads a user-selectable very many models of up to 20 MB. Once downloaded other one model is removed. To clear the memory I use the following code.

private function removeObject(data:ObjectContainer3D):void {
        
for (var i:int 0data.numChildreni++) {
            
var mesh:Mesh Mesh(data.getChildAt(i));
            if (
mesh.material is TextureMaterial)   TextureMaterial(mesh.material).texture.dispose();
            
mesh.geometry.dispose();
        
}

       object3d
.removeChild(data);

The problem is that the memory is cleared very slowly. If I quickly remove the objects and load the new, an error number 3691.

Error #3691: Resource limit for this resource type exceeded
at away3d.textures::Texture2DBase/createTexture() at away3d.textures::TextureProxyBase/getTextureForStage3D() 
at away3d.materials.methods::BasicDiffuseMethod/activate() 
at away3d.materials.passes::CompiledPass/activate() 
at away3d.materials.passes::SuperShaderPass/activate() 
at away3d.materials::MaterialBase/activatePass()
at away3d.core.render::DefaultRenderer/drawRenderables() 
at away3d.core.render::DefaultRenderer/draw() 
at away3d.core.render::RendererBase/executeRender() 
at away3d.core.render::DefaultRenderer/executeRender() 
at away3d.core.render::RendererBase/render() 
at away3d.containers::View3D/render() 

Tell me how possible speed up the cleanup?

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X