When we create a sprite like this
when dispose, should I just do this
or this
I mean, would the bitmap be freed if the sprite's freed? In the animation system that I use, if I don't free the bitmap, it'll keep on eating up the memory. But in the shooting game that I'm working on, I don't have to free the bitmap and the memory is still the same, so it confuses me
Thanks you in advance ^ ^
Code:
@object = Sprite.new
@object.bitmap = Bitmap.new(some_width,some_height)
when dispose, should I just do this
Code:
@object.dispose
or this
Code:
@object.bitmap.dispose
@object.dispose
I mean, would the bitmap be freed if the sprite's freed? In the animation system that I use, if I don't free the bitmap, it'll keep on eating up the memory. But in the shooting game that I'm working on, I don't have to free the bitmap and the memory is still the same, so it confuses me
Thanks you in advance ^ ^