zyedidia / SFML.jl

A binding of the game and multimedia library SFML for Julia
Other
93 stars 22 forks source link

Textures are not finalized #33

Open mweastwood opened 7 years ago

mweastwood commented 7 years ago

https://github.com/zyedidia/SFML.jl/blob/f7ce40b3289864f6df515605e46e07cd9aba3f0e/src/julia/Graphics/texture.jl#L6-L7

type Texture
    ptr::Ptr{Void}

    function Texture(ptr::Ptr{Void})
        t = new(ptr)
        # finalizer(t, destroy)
        # t
    end
end

Is there a reason the finalizer is commented out? I need these two lines uncommented or I end up leaking memory like crazy.

zyedidia commented 7 years ago

To be honest I'm not sure why it's commented out. There was probably a reason but I'm not sure if it's still relevant.