fasterthanlime / jooc-legacy

:crocodile: The historical, initial implementation of an ooc compiler in Java
http://ooc-lang.org/
MIT License
115 stars 4 forks source link

Regexp, PCRE memory leak #26

Closed mt2d2 closed 14 years ago

mt2d2 commented 15 years ago

sdk/text/regexp/PCRE.ooc

The allocated pcre struct is never freed by pcre_free(), causing what I assume to be a leak. This is implemented in a finalizer, and assumedly waiting on support for that.

nddrylliog commented 14 years ago

Added finalizers support in j/ooc, and renamed destroy to destroy in PCRE so that it is, in fact, registered as a finalizer.

Commits:

http://github.com/nddrylliog/ooc/commit/75d96fb42f72027a5cbf35bf27e5d0c3e20de133

http://github.com/nddrylliog/ooc-docs/commit/1d23c823b7af3c39afeeb3c43149a7c32a6270ed

Enjoy!