Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to free an server object

Status
Not open for further replies.

que

Programmer
May 27, 2001
1
0
0
CN
Hi, all,

I use C++ and visibroker in developing CORBA application.

Suppose such an IDL:

interface Foo
{
void func();
};

interface FooSystem
{
Foo test();
};

and the implementation class are FooImpl and FooSystemImpl,
the test method declared:

Foo_ptr FooSystemImpl::test()
{
FooImpl* pfi=new FooImpl();
Foo_ptr p=pfi->_this();
return p;
}

the client application call this test method, all work
fine. But how are the memory allocated by the new operation
be deallocated? if it is not deallocated, is it memory
leaking?

Thanks.
Que
 
I think you should create an interface for memory allocation such as in COM IMalloc. John Fill
1c.bmp


ivfmd@mail.md
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top