marcoonroad / families

Concatenation-based prototypes implementation for Lua. :microscope: :crescent_moon: :family_man_woman_girl_boy: :house_with_garden:
https://marcoonroad.github.io/families/
MIT License
3 stars 0 forks source link

GC finalizer tries to index clones from inexistent prototypes. #9

Closed marcoonroad closed 7 years ago

marcoonroad commented 7 years ago

When a topmost prototype object (from ex-nihilo creation, that is, an object containing nil as parent) is collected, its finalizer doesn't know whether it's a topmost prototype or not. Due that, the finalizer will try to add clones for such nil prototype, and thus errors are thrown mostly cause nil doesn't have clones in this library (there's no reason for that, nil won't eventually trigger and propagate changes anyways). The solution here is to patch the finalizer to detect if an object being collect is a topmost prototype.

marcoonroad commented 7 years ago

Closed by commit 2e22e9c.