Re: COM Interop and memory leaks
From: Robert Jordan (robertj_at_gmx.net)
Date: 08/30/04
- Previous message: Dmitry Nalivkin: "Re: COM Interop and memory leaks"
- In reply to: Dmitry Nalivkin: "Re: COM Interop and memory leaks"
- Next in thread: Dmitry Nalivkin: "Re: COM Interop and memory leaks"
- Reply: Dmitry Nalivkin: "Re: COM Interop and memory leaks"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 30 Aug 2004 09:42:28 +0200
Hi Dmitry,
> Hi
>
> Thanks for replying. As I understand, I must use COM+ object pooling through
> inheritance from ServiceComponent and enabling pooling through corresponding
> attributes. Then handler instances in pool will be deactivated when IE
> control releases references. But how RegisterNamespace will get to know that
> handler uses pooling? And which locking issues I can encounter?
No, with managed object pooling I mean you have to do your
own pooling of protocol handler instances. Just to avoid
the creation of "unlimited" instances.
Bye
Rob
>
> --
> With best regards, Dmitry
> "Robert Jordan" <robertj@gmx.net> ???????/???????? ? ???????? ?????????:
> news:cgugnf$ukm$04$1@news.t-online.com...
>
>>Hi Dmitry,
>>
>>
>>>I wrote an asynchronous protocol handler in VB.NET. Another my program
>
> in
>
>>>VB.NET installs it as temporary handler, creates forms with WebBrowser
>>>control, and navigates to URI's handled by my handler. I encountered
>>>continuous memory leaks while navigating to pages. After investigation
>
> with
>
>>>SOS and memory profiler I discovered that instances of my protocol
>
> handler
>
>>>class is creating at every request to a page or embedded element on it,
>
> but
>
>>>freed only at program termination!
>>
>>I assume you register the protocol handler with CoInternetSession's
>>RegisterNameSpace. RegisterNameSpace expects a IClassFactory, so
>>you're able to control the object creation. you can, for example,
>>use a managed object pool However, you'll have to deal with locking
>>in this case.
>>
>>Bye
>>Rob
>
>
>
- Previous message: Dmitry Nalivkin: "Re: COM Interop and memory leaks"
- In reply to: Dmitry Nalivkin: "Re: COM Interop and memory leaks"
- Next in thread: Dmitry Nalivkin: "Re: COM Interop and memory leaks"
- Reply: Dmitry Nalivkin: "Re: COM Interop and memory leaks"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|