[omniORB] VS .NET and memory leaks (again).

Frederic Prin frederic.prin at silvaco.com
Mon Jul 19 16:49:57 BST 2004


Hi Jon,

First you do not have to call run(). omniORB spawn its own thread to
handle incomming Corba call.
Run() is only usefull if your program needs to be blocked in a loop in
case of it doen't have another loop (gui for example)

In your case, it seems you have a GUI loop. So just don't call the run()
method.
But, on your WM_CLOSE handler code, call destroy() and
orb->shutdown(true) before it, in order the orb shutdowns gracefully.

Regarding the memory leaks, I have not yet hunt for it!

Fred

-----Original Message-----
From: omniorb-list-bounces at omniorb-support.com
[mailto:omniorb-list-bounces at omniorb-support.com] On Behalf Of Jon B
Sent: lundi 19 juillet 2004 15:36
To: omniorb-list at omniorb-support.com
Subject: [omniORB] VS .NET and memory leaks (again).


Hiya

I've seen quite a few e-mails in the list archive about memory leaks
being reported on program exit when running under Visual Studio.  I am
experiencing similar, but in my case I'm seeing dozens, if not hundreds,
of small leaks when the program terminates.

I'm using VS .NET 2002, with omniORB 4.0.3 (I rebuilt the libraries for
my compiler as suggested in the FAQ).  My program builds and works just
fine, but the splurge of warnings on exit makes me concerned that I'm
doing something wrong.

I want to be able to respond to CORBA calls, so on program startup I
create a thread which initialises the ORB and calls the 'run()' method
(I can provide the code if required).

I see that some sample code calls the 'destroy()' member to tidy things
up on exit, but as 'run()' doesn't return I don't see how I can do this.
The program currently exits via WM_CLOSE, so the ORB gets the rug pulled
out from under it (which might very well be the cause of the problem).

Any thoughts?  Anyone experienced similar problems?

Regards,

--
Jon





_______________________________________________
omniORB-list mailing list
omniORB-list at omniorb-support.com
http://www.omniorb-support.com/mailman/listinfo/omniorb-list




More information about the omniORB-list mailing list