[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference tuxedo::dce-products

Title:DCE Product Information
Notice:Kit Info - See 2.*-4.*
Moderator:TUXEDO::MAZZAFERRO
Created:Fri Jun 26 1992
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2269
Total number of notes:10003

2114.0. "Freeing an object obtained with bind (idl/cxx)" by ANNECY::LAROCHE_P (Ne Suze que si l'on Sancerre) Thu Jan 09 1997 09:03

T.RTitleUserPersonal
Name
DateLines
2114.1how to free an objectPTHRED::VIVENEYBob ViveneyFri Jan 10 1997 11:3439
2114.2ANNECY::ROUIBAH_NNourr�dine ROUIBAHMon Jan 13 1997 03:3814
2114.3Freeing an object obtained with bind (idl/cxx)PTHRED::VIVENEYBob ViveneyMon Jan 13 1997 10:1627
2114.4BHAJEE::AIGNERFri Jan 17 1997 08:5765
2114.5Some AnswersPTHRED::VIVENEYBob ViveneyFri Jan 17 1997 15:38141
2114.6BHAJEE::AIGNERTue Jan 21 1997 05:1627
2114.7AnswersPTHRED::VIVENEYBob ViveneyTue Jan 28 1997 10:3221
Helmut wrote:

> There is one interesting point I would like to be sure in.
> When performing decRef to an object, which reference count is 0, nothing
> happens. Is this correct ?
Correct.

> I know, this situation never should occur.
Correct.

> BTW, wouldn't it be useful to have a member function of object_reference
> which returns the value of the actual reference count (e.g. getRefCount()) ?
There is. The decRef() and incRef() APIs each return an unsigned long which
is the new value of the object's reference count after the operation has
been performed.

So, for example, to delete an object using decRef() rather than delete, you
could do ...
	while (objPtr->decRef() > 0);

- Bob 
2114.8Problem deleting proxy object when "client" did not "detach"ANNECY::LAROCHE_PNe Suze que si l'on SancerreWed May 14 1997 13:2525
Hello,

I tried to do what is explained in .5 and it works quite well:

<< If the server calls 'delete dynObj_p', then the DCE runtime will know that
<< the server is deleting its reference to a remote object and issue a
<< decRef() back to the client. If the reference count is one on the client's
<< local object, it gets deleted.

I have a problem if the client has disappeared without performing the client
call: the delete tries to do the decRef () back to the client, and of course,
cannot do it as the client is no more there. That's fine and I can handle
the exception generated by the 'delete dynObj_p' in a TRY CATCH block. The 
problem I have is that in this case, some memory (probably related to the
proxy object) is not freed.

Is this a normal behaviour? Is there something I can do to prevent this
memory leak?

Thank you in advance,
Pierre

PS:I am using DCE V2.0A with DIGITAL UNIX V4.0.