|
|
|
|
||||||
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
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. |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
Przemek wrote:
> 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: [snip] > Then object isn't collected by GC and still get host memory. > What to do? Post in a group where your question is on-topic. You will be much better off there. This group discusses standard C++ not CLI/C++. In particular, garbage collection is not part of C++ and neither are library components in the System::... hierarchy. You might find good suggestions for where to ask your question in the FAQ http://www.parashift.com/c++-faq-lit...t.html#faq-5.9 Best Kai-Uwe Bux |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
On Dec 8, 1:57 pm, "Przemek" <refere...@interia.pl> wrote:
> 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. http://groups.google.com/group/micro...es.vc?lnk=iggc |
|
![]() |
| Outils de la discussion | |
|
|