detecting dangling feature readers

3 messages Options
Embed this post
Permalink
zspitzer

detecting dangling feature readers

Reply Threaded More More options
Print post
Permalink
just following up on this ticket
http://trac.osgeo.org/mapguide/ticket/989

it's there any method available to enumerate open readers
to detect these kind of leaks?

--
Zac Spitzer -
http://zacster.blogspot.com
+61 405 847 168
_______________________________________________
mapguide-internals mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-internals
Walt Welton-Lair

RE: detecting dangling feature readers

Reply Threaded More More options
Print post
Permalink
Just to clarify, it's technically not a leak - the reader's destructor does call Close.  The problem occurs ifyou use .NET code in your web tier.  The managed readers in the web tier don't get garbage collected right away, and this can lead to a buildup of cached readers on the serve (this was the "leak" reported in the ticket).  Once GC kicks in the web-tier proxy readers are destroyed / closed, and this also cleans up the corresponding readers on the server.

Nevertheless, it's still good practice to call Close as soon as you're done with the reader.  I don't know of any API which can enumerate the open readers.

Walt
________________________________________
From: [hidden email] [[hidden email]] On Behalf Of Zac Spitzer [[hidden email]]
Sent: Friday, May 22, 2009 11:58 PM
To: MapGuide Internals Mail List
Subject: [mapguide-internals] detecting dangling feature readers

just following up on this ticket
http://trac.osgeo.org/mapguide/ticket/989

it's there any method available to enumerate open readers
to detect these kind of leaks?

--
Zac Spitzer -
http://zacster.blogspot.com
+61 405 847 168
_______________________________________________
mapguide-internals mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-internals
_______________________________________________
mapguide-internals mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-internals
zspitzer

Re: detecting dangling feature readers

Reply Threaded More More options
Print post
Permalink
i was just wondering because there have been a few posts on mg-users
where people have encountered a few different issues caused by not
closing readers,
the majority being hang overs from 1.2x era code samples

On Sat, May 23, 2009 at 4:45 PM, Walt Welton-Lair
<[hidden email]> wrote:

> Just to clarify, it's technically not a leak - the reader's destructor does call Close.  The problem occurs ifyou use .NET code in your web tier.  The managed readers in the web tier don't get garbage collected right away, and this can lead to a buildup of cached readers on the serve (this was the "leak" reported in the ticket).  Once GC kicks in the web-tier proxy readers are destroyed / closed, and this also cleans up the corresponding readers on the server.
>
> Nevertheless, it's still good practice to call Close as soon as you're done with the reader.  I don't know of any API which can enumerate the open readers.
>
> Walt
> ________________________________________
> From: [hidden email] [[hidden email]] On Behalf Of Zac Spitzer [[hidden email]]
> Sent: Friday, May 22, 2009 11:58 PM
> To: MapGuide Internals Mail List
> Subject: [mapguide-internals] detecting dangling feature readers
>
> just following up on this ticket
> http://trac.osgeo.org/mapguide/ticket/989
>
> it's there any method available to enumerate open readers
> to detect these kind of leaks?
>
> --
> Zac Spitzer -
> http://zacster.blogspot.com
> +61 405 847 168
> _______________________________________________
> mapguide-internals mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/mapguide-internals
> _______________________________________________
> mapguide-internals mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/mapguide-internals
>



--
Zac Spitzer -
http://zacster.blogspot.com
+61 405 847 168
_______________________________________________
mapguide-internals mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-internals