Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: 2002-04-17 (10:54)
From: Jakob Lichtenberg <jl@i...>
Subject: [Caml-list] camlidl - finalizing cows without COM!

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

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...


- Jakob Lichtenberg
To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: