PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.cplus > .NET Remoting - host do not free remote objects alocated memory
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
.NET Remoting - host do not free remote objects alocated memory

Réponse
 
LinkBack Outils de la discussion
Vieux 08/12/2007, 10h57   #1
Przemek
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut .NET Remoting - host do not free remote objects alocated memory

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.


  Réponse avec citation
Vieux 08/12/2007, 11h52   #2
Kai-Uwe Bux
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: .NET Remoting - host do not free remote objects alocated memory

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
  Réponse avec citation
Vieux 08/12/2007, 20h16   #3
terminator
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: .NET Remoting - host do not free remote objects alocated memory

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
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 22h41.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,11153 seconds with 11 queries