[fpc-pascal] Disposing pointers and memory leaks
webpirat at mail.ru
Sun Mar 29 11:14:57 CEST 2009
Joseph Montanez wrote:
You allocated memory for Cursor
> Cursor := DrawPixel(Screen, X, Y, 253, 253, 253);
You assigned something to Cursor. Thus it is not pointed anymore to your
previously allocated memory.
You are trying to deallocate memory to which Cursor is pointing. Don't
forget that it is pointing to the memory allocated by New anymore after
I suppose you need to remove both New and Dispose.
More information about the fpc-pascal