Derelict SFML destructor crashes
Jeremy DeHaan
dehaan.jeremiah at gmail.com
Mon Dec 17 00:23:01 PST 2012
I am somewhat confused by some things that are being talked about
in this thread.
Mike Parker said that this Image is handled by GC. Would that
mean that any class members are handled by the GC too? If so,
wouldn't the sfImage* be collected by the GC?
If not, and you DO need to manually delete the pointer, is there
anything wrong with something like:
~this
{
destroy(image);
}
I am just thinking that it would suck to have to manually call
destroy/delete on each object before exiting main. I tested this,
and I didn't get any memory errors, so I can assume it is
working? I did get an error if I used delete image, however.
What's the difference between the two?
On Monday, 17 December 2012 at 07:25:06 UTC, Jacob Carlborg wrote:
> C. Use a struct and call a destroy/delete function in its
> destructor.
And how does calling destroy/delete in a struct destructor differ
from doing the same in a class destructor? I too would like to
make sure I am not getting any memory leaks!
On 2012-12-17 07:45, Nekroze wrote:
>Sorry about not posting on the derelict forums, i cant remember
>exactly what happened but i made an account and it said i have
>to wait for authentication or something so i couldn't post...
>may have it confused with another forum but yeah will do in the
>future when i can post there.
It was a different forum. I got the same error that you did on
the same forum. Nice to know there's this one dedicated to
Derelict! I just made an account, so I'll see you in there!
More information about the Digitalmars-d-learn
mailing list