[Papervision3D] removing MaterialList references for DAE
val
valhead at gmail.com
Tue Aug 26 14:14:57 PDT 2008
I'm attempting to remove a model (DAE) completely to free up memory.
Basically, I'm building slightly diferent versions of the same item over nad
over (same model, different materials) but only one needs to be visible at
once. I'd like the non-visible ones to be completely removed to free up
memory.
I can't seem to get this model be removed completely from memory according
to the Flex Profiler. I think I've narrowed it down to the MaterialList
being the problem as I've been able to remove a different model which had no
materials in a similar way.
What's the proper method of removing all references to BitmapMaterials and
the MaterialList for a model?
Here's what I'm currently doing, but it's not working as stated above:
mydae.removeEventListener(FileLoadEvent.LOAD_COMPLETE,
myAwesomeFunction);
mydae.getChildByName("COLLADA_Scene").getChildByName("childName").removeEventListener(InteractiveScene3DEvent.OBJECT_CLICK,
onClickFun);
removeChild(mydae);
dae_materialList.getMaterialByName("name1").interactive = false;
dae_materialList.getMaterialByName("name1").destroy();
dae_materialList.getMaterialByName("name2").destroy();
podMaterials.getMaterialByName("name3").destroy();
podMaterials = null;
mydae.COLLADA = null;
mydae.filename = null;
mydae = null;
(I'm using rev 691)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20080826/d0bf3050/attachment.html
More information about the Papervision3D
mailing list