caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "kyra" <kyrab@mail.ru>
To: <caml-list@inria.fr>
Subject: Re: [Caml-list] OCam'OLE pre-release
Date: Sun, 4 Aug 2002 15:00:33 +0300	[thread overview]
Message-ID: <001701c23bae$8a200de0$551aa8c0@kyra> (raw)
In-Reply-To: <HDEEJKDKJOFDHDMBDAGHMEHOCFAA.qbradley@newheights.com>

From: "Quetzalcoatl Bradley" <qbradley@mail.newheights.com>
>
> It is not safe to use any COM object, including calling Release on it,
after
> calling CoUninitialize.  Also in my experience there is much danger in
> relying on the order of constructor and destructor call of static
variables
> to manage lifetime of COM objects or CoInitialize/CoUnitialize call.
>
> Move your CoUnitialize call out of a static variable and into the last
> statement of your program.  Since the GC will not run after your
> CoUnitialize call, no Release calls will be made on any COM object after
> CoUnitialize.  Alternatively, do whatever is necessary to make sure that
all
> your COM objects are released before your program exits (perhaps by making
> sure there is no reachable COM object and then doing a "full major"
garbage
> collection?)

Errors mentioned have HOTHING with improper CoUnitialize call. I' have
already written they persist even if I _remove_ CoUnitialize totally. Errors
are because of COM interface is called _after_ being entirely Released.
Moreover, not only native olegen but also native excel1 works just fine with
my modifications. My static object destructor call of CoUninitialize does
not check 'uninit' flag and so 'do_not_close()' has no impact on
CoUninitialize call, but I see no any freezings or something like this.

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.

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


  reply	other threads:[~2002-08-04 10:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-30 19:19 Nicolas Cannasse
2002-07-31 12:06 ` [Caml-list] OCam'OLE pre-release (mirror) Nicolas Cannasse
2002-07-31 12:48   ` Samuel Lacas
2002-07-31 13:13     ` Nicolas Cannasse
2002-07-31 13:30       ` Samuel Lacas
2002-08-01 23:39 ` [Caml-list] OCam'OLE pre-release kyra
2002-08-02 10:13   ` Nicolas Cannasse
2002-08-02 23:26     ` kyra
2002-08-02 23:23       ` Quetzalcoatl Bradley
2002-08-04 12:00         ` kyra [this message]
2002-08-03 11:47     ` kyra
2002-08-05  7:46       ` Nicolas Cannasse
2002-08-05  9:32         ` Xavier Leroy
2002-08-05  9:51           ` Nicolas Cannasse
2002-08-06 12:15             ` kyra
2002-08-07  8:55               ` Nicolas Cannasse

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='001701c23bae$8a200de0$551aa8c0@kyra' \
    --to=kyrab@mail.ru \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).