[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Michael Wohlwend <micha-1@f...> |
| Subject: | memory handling with native code |
I'm trying to make an interface to a c++ lib of a friend of me, it's getting better, but questions about the memory management came up: Say there is a c++ class widget, which I want to mirror on the ocaml side. So I implemented a c++ widget-adapter, which inherits from widget and forwards events to the ocaml widget class. This works fine, but how to delete the widget adapter? In the case the ocaml class gets destroyed by the gc the adapter on the native side is still there. Should I wrap the pointer in a custom object? cheers, Michael -- "Feel free" – 10 GB Mailbox, 100 FreeSMS/Monat ... Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail