P
Przemek
Hi,
I writing in CLI/C++ [VS2005] and I found a little problem in my app.
I working with NET Remoting (System::Runtime::Remoting namespace) and the
problem is:
I set all the information about object lifetime in my appdomain (my Host
domain) like this:
<code>
LifetimeServices::LeaseTime = System::TimeSpan::FromMinutes(7);
LifetimeServices::RenewOnCallTime = System::TimeSpan::FromMinutes(3);
<code\>
It works correct and I can't acces to object after 7 mins or 3 mins after
last call - it's ok so I think LifeTime services is set corectly - but when
I look on memory usage of my Host application process it's nothing change!
Ater lose connection to my remote objects (correct end of life time) Host
memory is not released by GC!
Host still get 80-90 MBs of RAM after few clients calls and not destructed
object. So - if lifetime is finish - I lose connection to my object and
memory should be free by GC - but it isn't! - host process memory is the
same even after half hour!.
This problem doesn't appear when client call remote object destructor
(delete myRemoteObject) programaticly - then memory is release.
<code>
MyRemoteClass ^remoteObject = gcnew MyremoteObject(); // create remote
obj
// work
delete remoteObject; // destruction of my emote obj with memory release
on server side
<code/>
But natural is, tahat I can't delete the object always - not in situation
when client app loose net connection or
just hang up! Then object isn't collected by GC and still get host memory.
What to do?
thanx - PP.MM.
I writing in CLI/C++ [VS2005] and I found a little problem in my app.
I working with NET Remoting (System::Runtime::Remoting namespace) and the
problem is:
I set all the information about object lifetime in my appdomain (my Host
domain) like this:
<code>
LifetimeServices::LeaseTime = System::TimeSpan::FromMinutes(7);
LifetimeServices::RenewOnCallTime = System::TimeSpan::FromMinutes(3);
<code\>
It works correct and I can't acces to object after 7 mins or 3 mins after
last call - it's ok so I think LifeTime services is set corectly - but when
I look on memory usage of my Host application process it's nothing change!
Ater lose connection to my remote objects (correct end of life time) Host
memory is not released by GC!
Host still get 80-90 MBs of RAM after few clients calls and not destructed
object. So - if lifetime is finish - I lose connection to my object and
memory should be free by GC - but it isn't! - host process memory is the
same even after half hour!.
This problem doesn't appear when client call remote object destructor
(delete myRemoteObject) programaticly - then memory is release.
<code>
MyRemoteClass ^remoteObject = gcnew MyremoteObject(); // create remote
obj
// work
delete remoteObject; // destruction of my emote obj with memory release
on server side
<code/>
But natural is, tahat I can't delete the object always - not in situation
when client app loose net connection or
just hang up! Then object isn't collected by GC and still get host memory.
What to do?
thanx - PP.MM.