gnue / NEWT0

NewtonScript
http://gnue.github.io/NEWT0
34 stars 13 forks source link

Add CObjects for garbage collection aware native (C) objects #19

Closed pguyot closed 4 years ago

pguyot commented 4 years ago

Following NewtonOS, add CObjects as special binaries that contain a pointer to a destructor and a marker function. Add use of CObjects for protoFILE and protoREGEX, fixing a memory leak. Added tests for protoFILE and protoREGEX, including a protoFILE test that demonstrates CObjects are garbage collected.