You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can this be used with FFI to track manually allocated memory (malloc / free)?
With NativeFinalizers
If you already use NativeFinalizers to invoke free: no.
Because then both the NativeFinalizer that frees the memory will run, and the Finalizer that tracks whether an object that holds on to memory cannot be canceled by the NativeFinalizer that invokes free.
Since the NativeFinalizer and leak_tracker both rely on the GC, you wouldn't get any new information anyway.
With Pointers
If you manually call free, but working directly withPointers: no.
The value and detach arguments do not count towards those objects being accessible to the program. Both must be objects supported as an Expando key. They may be the same object.
Can this be used with FFI to track manually allocated memory (
malloc
/free
)?If so, it would be awesome to be able to use this to check for errors in FFI code... @dcharkes
The text was updated successfully, but these errors were encountered: