[omniORB] Memory Leaks in WinNT

Guy Trudel gtrudel@mediatrix.com
Tue, 8 Aug 2000 10:48:26 -0400


They are not 'real' memory leaks, they are singleton and initialisation
stuff that must be there for the lifetime of the process. Once simple way to
get rid of lot of them is to temporary deactivate the memory allocation
check. 

    _CrtSetDbgFlag( ~_CRTDBG_ALLOC_MEM_DF );

    CORBA::ORB_ptr orb = CORBA::ORB_init(nArcg,ppArg,"omniORB2");
    CORBA::BOA_ptr boa = orb->BOA_init(nArcg,ppArg,"omniORB2_BOA");

    _CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF );

Guy Trudel

> -----Original Message-----
> From: Matthew Berry [mailto:mberry@mweb.co.za]
> Sent: Tuesday, August 08, 2000 10:24 AM
> To: omniorb-list@uk.research.att.com
> Subject: [omniORB] Memory Leaks in WinNT
> 
> 
> I have had a problem with memory leaks using omniORB280 under 
> WinNT 4.0. I
> am statically linking all the libraries in debug mode.
> 
> Even with a simple windows application (see segment below) 
> that does nothing
> but initialise a BOA and then destroy it, this occurs.
> 
> Has anyone else had similar problems and been able to solve them?
> 
> 
> // ----------------------
> CODE ----------------------------------------------
> 
> BOOL CCorbaTestApp::InitInstance()
> {
> 	static char* argv[] = {"CorbaRunTime", 0};
> 	int argc = 1;
> 
> 	CORBA::ORB_ptr orb = CORBA::ORB_init(argc, argv, "omniORB2");
> 	CORBA::BOA_ptr boa = orb->BOA_init(argc, argv, "omniORB2_BOA");
> 
> 	boa->destroy();
> 	orb->NP_destroy();
> 
> 	return FALSE;
> }
> 
> // ---------------------- OUTPUT 
> -------------------------------------------
> 
> Detected memory leaks!
> Dumping objects ->
> {571} normal block at 0x00C291C0, 4 bytes long.
>  Data: <TAOB> 54 41 4F 42
> {570} normal block at 0x00C2AD10, 14 bytes long.
>  Data: <192.168.196.2 > 31 39 32 2E 31 36 38 2E 31 39 36 2E 32 00
> {569} normal block at 0x00C293D0, 6 bytes long.
>  Data: <TCPIP > 54 43 50 49 50 00
> {568} normal block at 0x00C29460, 16 bytes long.
>  Data: <  a             > D4 D9 61 00 D0 93 C2 00 10 AD C2 00 
> 06 06 CD CD
> 
> .... etc
> 
>