On Fri, 12 Dec 2008 22:38:26 +0100, stbenge
<THI### [at] hotmail com> wrote:
> There is an issue that's bugging me though. Can anyone tell me why I get
> a warning when I try to delete an array of sprite objects like so:
>
> delete [] tile;
Because it is the wrong thing to do?
> I initialized the array like this:
>
> hgeSprite *tile[8*8]
'tile' itself is not dynamically allocated. The elements contained in
'tile' however are pointers to dynamically allocated objects, and
therefore need to be deallocated individually.
--
FE
Post a reply to this message
|