[OpenLayers-Trac] [OpenLayers] #1123: OpenLayers.Layer.Markers.destroy() should destroy its markers
OpenLayers
trac at openlayers.org
Mon Dec 3 15:59:22 EST 2007
#1123: OpenLayers.Layer.Markers.destroy() should destroy its markers
----------------------------+-----------------------------------------------
Reporter: ahocevar | Owner: euzuro
Type: bug | Status: new
Priority: minor | Milestone: 2.6 Release
Component: Layer.Markers | Version: 2.5
Resolution: | Keywords: review
----------------------------+-----------------------------------------------
Comment (by elemoine):
Replying to [comment:8 ahocevar]:
> Replying to [comment:7 elemoine]:
> > Moreover, I think ahocevar's isn't correct because the markers array
is empty at time it loops over it to destroy each marker.
>
> Yes, you caught me. That is true. To be honest, I cannot remember why I
filed this ticket. It must have been some memory leak problems with
Layer.!GeoRSS, which I cannot reproduce any more. Anyway, things seem
surprisingly complicated because Layer.!GeoRSS subclasses Layer.!Markers,
but different than Layer.!Markers, it creates its markers more or less
itself, because it lets its features create them.
I looked at the code more closely and Layer.Text and Layer.GeoRSS do
destroy the markers they create. clearFeatures() calls feature.destroy(),
which takes care of destroying the marker attached to the feature. But
yet, based on what's recently been reported on users at openlayers.org
there's a memory leak somewhere. I think it's related to the icon, but I'm
still invretigating that issue.
> Sorry for the confusion.
No confusion, no problem :-)
Thx Andreas,
--
Ticket URL: <http://trac.openlayers.org/ticket/1123#comment:9>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer
More information about the Trac
mailing list