How correctly to remove a Room?
Posted: 30 Jan 2011, 18:04
I write Zone extensoin to which players are connected. Then, between them, I create a room and joint them to it also adds NPC.
When the game is over I need to free up room and clean up after itself. Now I call
Room remove mode is WHEN_EMPTY.
Destroy function in Room Extension is override when I free resources.
Everything is correct?
NPC variables and properties will be cleared and dispose?
When the game is over I need to free up room and clean up after itself. Now I call
Code: Select all
for (User user : room.getUserList())
{
if(user.isNpc()) SmartFoxServer.getInstance().getAPIManager().getSFSApi().disconnectUser(user);
else SmartFoxServer.getInstance().getAPIManager().getSFSApi().leaveRoom(user, room);
}Destroy function in Room Extension is override when I free resources.
Everything is correct?
NPC variables and properties will be cleared and dispose?