Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] camlidl - finalizing cows without COM!
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jakob Lichtenberg <jl@i...>
Subject: [Caml-list] camlidl - finalizing cows without COM!
Hi,

I have just started hacking in camlidl and for now had a really pleasant
experience.

However I really can't find out how to create a finalized object without
going into COM interfaces.

Say my underlying C library for manipulating ..... hmmm.. cows  has a
function that creates and references a new cow, and a function that is used
to de-reference the cows when they no longer are live:

typedef int cow;
cow createAndReferenceCow(void);
void freeCow(cow);

Now, when the OCaml structures for some reason decide to garbage collect my
cow the finalized object should call freeCow......  I have done this a bunch
of times without the idl interface, but have no clue how to specify this in
an idl file.  Help!!!

And I would really *love* not to bring COM interfaces into this...

Thanks,

- Jakob Lichtenberg
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners