Garbarge Collector on strike

  • Thread starter Thread starter Jenny
  • Start date Start date
J

Jenny

After running for 8 hours, our n-tier DB program (written
in VB.NET) gradually grows from 50MB to 561MB in size. It
slowly grinds to a halt & the end user has to restart the
application. Is there a way to explicitely call the
garbarge collector? I previously developed in C++ & had
to call New[] and delete[].

This memory mgt instability in .NET is not acceptable.
Howver, porting to Java isn't an option at this time.

Jenny :0
 
I have developed quite a bit of apps with .NET and have never found memory
mgt instability.

Have you profiled your application?
 
Hi Jenny,

Jenny said:
After running for 8 hours, our n-tier DB program (written
in VB.NET) gradually grows from 50MB to 561MB in size. It
slowly grinds to a halt & the end user has to restart the
application. Is there a way to explicitely call the
garbarge collector? I previously developed in C++ & had
to call New[] and delete[].

This memory mgt instability in .NET is not acceptable.
Howver, porting to Java isn't an option at this time.

I think you're being hasty blaming this on .NET "memory mgt
instability". There are some things that must be taken into account in a
distributed app that, if ignored, could result in your app "leaking". Does
your middle tier use COM+ component services (i.e. do you have middle tier
"service" objects that inherit from ServicedComponent)? If so, the client
should "dispose" of those objects when it is done with them, or (a better
option, IMHO) make your "service" objects JIT activated (see the
JustInTimeActivation attribute).

Regards,
Dan
 
No.

However, It's a VB.NET form based app. So when you leave
a form (and all of its children), and let the app sit on
the main form for several hours, the memory should be
reclaimed - as all child forms and procedure have gone out
of scope.

BTW: This app uses CrystalReports.Net. Is it possible
that I need to set rpt = Nothing, rpt.Dispose()
OR
set MyForm.Dispose() or set MyForm = Nothing throughout
app instead of assuming the .NET runtime will perform
garbage collection when the objects go out of scope?

Jenny
 
I looked at Crystal Reports a long time ago and they did use interop with
unmanaged code (I believe..). If so they should supply a Dispose method that
clients should call to release the unmanaged resource.
 
Hi Dan,

No. The business layer strictly uses ADO.NET based
components written in VB.NET. Each of the workstations &
server (at the client site) has 1GB RAM & 120GB HD.
They're using MDAC 2.7, MSDE with SP3.
Does your middle tier use COM+ component services (i.e.
do you have middle tier "service" objects that inherit
from ServicedComponent)?
 
Back
Top