quote: Original post by algumacoisaqualquer
Thunder_Hawk - Well... Thanks!
dead_man_walking - sorry, but that didn''t made it, is getting the same error. I didn''t get the error with if (!ScreenMap){delete []ScreenMap;}, but I thinks this isn''t releasing any memory, so it is kind of pointless.
AP - I think that the problem is in the constructor, because it closed fine when I placed the delete part on coments, it has to be something there. i can post the code here, but i think it will be a little dificult to follow it, plus, I wasn''t geting any errors before using this class.
Thanks all you guys for the help!
First, please say that you are not using CreateMap anywhere outside of your constructors (its possible to fix it for that). Second, make sure you are not "delete"ing your pointers outside of your deconstructor (which I''m beginning to suspect). Third, I know its kind of nit-picky, but make sure you use delete like this:
"delete [] newed_array_pointer_name" or
"delete newed_pointer_name"
(notice the spacing around "[]")
Fourth, get used to this kind of problem... It happens quite often.
_____________________________
And the Phoenix shall rise from the ashes...
--Thunder_Hawk -- ¦þ
______________________________