You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Functions that create something that needs to be destroyed later should probably associate the finalizer with ffi.gc. For example:
functionsdl.createTextureFromSurface (...)
returnffi.gc(sdl.C.SDL_CreateTextureFromSurface(...), sdl.C.SDL_DestroyTexture)
end
This might cause unexpected behavior in certain cases (for example a cursor could get GC'd while still in use), but overall would probably be worth it. I'd be willing to make a PR if there's any interest in this.
The text was updated successfully, but these errors were encountered:
Functions that create something that needs to be destroyed later should probably associate the finalizer with
ffi.gc
. For example:This might cause unexpected behavior in certain cases (for example a cursor could get GC'd while still in use), but overall would probably be worth it. I'd be willing to make a PR if there's any interest in this.
The text was updated successfully, but these errors were encountered: