how to destruct OpenSpace Object and SFS object
Posted: 14 Sep 2009, 13:20
Hy,
One of the missions that we cooped with during testing of the engine, is
what to do when one of the xml maps is missing.
we decide to 'clean' up the memory from both the openspace object and
the smartfox object, and allocate them again. But seems to be some problem:
her's an explanation of our moves:
as far as we using flex, our openspace object is allocated the followed:
_osWrapper=new OpenSpaceFlexWrapper();
addChild(_osWrapper);
os=_osWrapper.os;
when 'destructing' the allocated objects we're making the next moves:
1) smartFox.leaveRoom(currentRoomId);
2) smartFox.logout();
3) smartFox.disconnect();
4) _os=null;
5) _osWrapper=null;
and of coarse removing all the attached events.
The problem:
when we call the 'build' function again (the 3 rows above) ,
everything work fine, but on part of the new openspace object, there seems to be upper white rectungled layer. this layer is hiding part of the
loaded openspace world.
it seems to us that some memory of the previous entity of openspace
wasn't 'released' properly.
Could you tell us please, what we did wrong in our 'destructing' process ?
Thanks alot
One of the missions that we cooped with during testing of the engine, is
what to do when one of the xml maps is missing.
we decide to 'clean' up the memory from both the openspace object and
the smartfox object, and allocate them again. But seems to be some problem:
her's an explanation of our moves:
as far as we using flex, our openspace object is allocated the followed:
_osWrapper=new OpenSpaceFlexWrapper();
addChild(_osWrapper);
os=_osWrapper.os;
when 'destructing' the allocated objects we're making the next moves:
1) smartFox.leaveRoom(currentRoomId);
2) smartFox.logout();
3) smartFox.disconnect();
4) _os=null;
5) _osWrapper=null;
and of coarse removing all the attached events.
The problem:
when we call the 'build' function again (the 3 rows above) ,
everything work fine, but on part of the new openspace object, there seems to be upper white rectungled layer. this layer is hiding part of the
loaded openspace world.
it seems to us that some memory of the previous entity of openspace
wasn't 'released' properly.
Could you tell us please, what we did wrong in our 'destructing' process ?
Thanks alot