planetis-m / naylib

Yet another raylib Nim wrapper
MIT License
234 stars 10 forks source link

Prevent double-free errors when user accidentally calls unload* #61

Closed planetis-m closed 1 year ago

planetis-m commented 1 year ago

This library uses destructors, so the unload* procs shouldn't be exposed. Reason is that they don't null the pointers. Only reset(x) does. Except unloadModelKeepMeshes, this should be kept and pbl wrapped to call x = default(T) afterwards.