So it turns out that it's completely necessary to dispose everything, like Images, otherwise memory leaks result, and exceptions are soon thrown, as demonstrated in this simple piece of code:
import dsfml.graphics.all;
void main()
{
while(true)
auto rect = new Image(1024, 1024);
}
We can use .dispose() inside the loop, to free the allocated memory;
the only problem is, this throws exceptions and/or gives access violations when the objects are ACTUALLY destroyed, as demonstrated in:
import dsfml.graphics.all;
void main()
{
auto rect = new Image(1024, 1024);
rect.dispose();
}
What's the proper procedure here? Either memory leaks or access violations?
Edit: Fixed by calling GC.collect() manually once-in-a-while.