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] OCam'OLE pre-release
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Nicolas Cannasse <warplayer@f...>
Subject: Re: [Caml-list] OCam'OLE pre-release
> Again. Ocaml can GC any variable thas is no longer used 'as an ocaml
> variable'. But it turns out the underlying object is still used 'as COM
> object'. In the case of olegen may this be a bad design of oleaut32
> Anyway, 'automatic' solution does not exist, so if we map ocaml 'finalize'
> to COM 'Release', we must maintain some 'discipline' trying to reference
> ocaml variable somewhere if we know it is still used as COM object. Hmm.
> so, where in is this problem buried?

The job of the GC is to release unreferenced objects.
But I don't see how this can cause a bug : it seems that your crash is due
to a call of a COM method on a object AFTER it has been released... if it
has been Release, then it is no longer referenced by Ocaml... so , how can u
ever call a method on it ???

>I am too bad com or ocaml expert, but i'd prefer to unbind Release from
>com_finalize, and to have an option to call Release explicitly.

This solution is not an acceptable one.
You still can choose to modify OCam'OLE on your own....

Nicolas Cannasse

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