Re: Is this .NET problem

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Ramesh K (krh_at_srasys.co.in)
Date: 04/14/04


Date: Wed, 14 Apr 2004 09:57:00 +0530

Hi,
    Thanks for the reply.
    Even after waiting for a while these references are not getting
released.

Regards,
Ramesh

"intrader" <intrader@attglobal.net> wrote in message
news:hx2fc.11067$GU.8360@twister.socal.rr.com...
> Ramesh K wrote:
>
> > Hi All,
> > During Attach to a process like DLLHOST ,DLLHOST has FILE references
> > to
> > the system dlls like " odbc32.dll etc..(One can observer this in process
> > explorer tool of Sysinternals.com by selecting the "View Handles" from
the
> > View menu)
> >
> > But during the Detach process same handles are not getting released by
> > the
> > DLLHOST process.WHY?
> >
> > My application has a requirement that the custom dlls loadded into
DLLHOST
> > can be unloaded(using cofreeunsued libraries) and modified whenever
> > needed, because of the above problem unakbe to update the custom dll.
> >
> >
> > steps to be folowed to simuate the problem.
> > Step1) create a C++ COM component named "A" and another C++ COM
component
> > named "B" which creates "A" upon a method invocation let us say
> > CreateMe().Add another method in "B" to unload the component "A" letus
say
> > KillMe()..in this method release the "A" reference and call
> > CoFreeUnUsedLibraries() so that "A" is unloaded.
> > Step2)Add "B" to DLLHOST using Component services asministrative tool
> > Step3)create a client application which creates component "B" anc calls
> > CreateMe() so that "A" is also created.Add another button to call
KillMe()
> > of "B".
> > Step4)Open "A" in devenv. and attach to the DLLHOST(make sure dbgproxy
is
> > running..as we are debugging Native C++ applicatipn to start this use
net
> > start dgbproxy.exe from .NET command prompt).Now you can debugger
loading
> > systems dll's and custom dlls in the output box..Now open Process
> > explorer(tool from sysinternals.com) and select teh View Handles option
> > from View menu..A.dll FILE handle is present here.
> > Step5)Detach "A" from DLLHOST
> > Step6)Now click on the button of the client application which calls
> > KillMe() of "B".Now the "A" DLL is unloaded. BUT Still the FILE
reference
> > for "A" exists under DLLHOST
> >
> > Any suggestions are welcome.
> >
> >
> > Regards,
> > Ramesh
> Seems to me that what is happening is that resources are simply not
released
> as you expect, but that possibly the GC is involved. The resources will be
> eventually returned. However, if you wait, say about sometime, and the
> resources are not released, I suspect that you found a bonafined leak.
>



Relevant Pages

  • Re: Is this .NET problem
    ... Ramesh K wrote: ... > Even after waiting for a while these references are not getting ... >> Seems to me that what is happening is that resources are simply not ... I suspect that you found a bonafined leak. ...
    (microsoft.public.dotnet.framework)
  • Re: WMP10 Playlists
    ... Ramesh Srinivasan, ... Best regards, ... > You're welcome, Perry. ... > Windows® XP Troubleshooting http://www.winhelponline.com ...
    (microsoft.public.windowsxp.general)
  • Re: Errors using the Scripting Functoid
    ... Best regards ... compiler is called for your script, the set of references included are ... Errors using the Scripting Functoid ... Dim conn As New ...
    (microsoft.public.biztalk.general)
  • Re: MP needed for 24x36 print?
    ... > I don't see any references to larger prints. ... > 24x36 poster size print in regards to digital photo resolution and ...
    (rec.photo.digital)
  • Re: Named Ranges
    ... Best regards ... If the name references a formula you should use Evaluate but bear in mind ... PS: its not Jan Karel Pieterse's Name Manager: we co-authored it. ... I've been trying out Jan Karel Pieterse's Name Manager add-in ...
    (microsoft.public.excel.programming)