status-im / nim-secp256k1

A wrapper for libsecp256k1
Apache License 2.0
10 stars 5 forks source link

use destructors #27

Closed sinkingsugar closed 1 year ago

sinkingsugar commented 4 years ago

@arnetheduck I saw you added a finalizer but it was never called, I swapped with destructors to experiment with ARC/ORC but it's not called either anyway, not sure how nim manages TLS tbh.. but I guess it does not matter.

Opening a draft for now.

arnetheduck commented 4 years ago

destructors and finalizers are broken in nim 1.2 - in fact, we should remove this finalizer (it's a thread-local context, we don't create and stop threads so it won't be a problem)