D
Diego Bernardes
Hi 
Yea, again a question to help me building the game XD
I have a class called Mob, when i instance a mob from the main i search
the name of mob in a list, if the name is there i create it and i call a
singleton class with all the images of the mob, so if i create the same
kind of mob again he will create it and use the images from the
singleton, to save memory.
Well here comes the problem, if all mobs die and i go town and i never
see this mob again, the singleton gonna still in the memory? 1 mob isnt
trouble, just 2mb, but if i see 200 kinds of mob its alot of memory and
i need free this, i tried to set the singleton nil but when i create the
same kind of mob again gives me a error.
So have any way to create the mobs and when all the mobs die, delete the
singleton too? And ofcourse, the same mob can be instanciable after if
the player see it.
And how i can destroy objetos is just = nil it?
Thanks guys!
Yea, again a question to help me building the game XD
I have a class called Mob, when i instance a mob from the main i search
the name of mob in a list, if the name is there i create it and i call a
singleton class with all the images of the mob, so if i create the same
kind of mob again he will create it and use the images from the
singleton, to save memory.
Well here comes the problem, if all mobs die and i go town and i never
see this mob again, the singleton gonna still in the memory? 1 mob isnt
trouble, just 2mb, but if i see 200 kinds of mob its alot of memory and
i need free this, i tried to set the singleton nil but when i create the
same kind of mob again gives me a error.
So have any way to create the mobs and when all the mobs die, delete the
singleton too? And ofcourse, the same mob can be instanciable after if
the player see it.
And how i can destroy objetos is just = nil it?
Thanks guys!