Hi all !

I've been messing with that Exception for a little time and I can't stand it anymore ^^

When I'm freeing my object(which is a Billboard), the program may crash (for the statistics, 3 crashes for 10 runs) and throw an "Invalid Pointer Exception".

The problem is that it is not crashing on a specific method, but at the last line of the destructor ... I can swap the lines, it'll still crash on the last one.

Here is my destructor :

[pascal]
destructor TBillBoard.Free;
Begin
SafeDelete(_VB);
SafeDelete(_Texture);
end;[/pascal]

The SafeDelete method is the one used by Clootie (thanks to him ^^). But anyway, I don't think the Release may crash the program ...

Any idea on what could be the problem ?

Thanks in advance

Avatar