World Wind Forums

Go Back   World Wind Forums > WorldWind .Net Development > Developers' Corner

Developers' Corner General World Wind development.

Reply
 
Thread Tools Display Modes
Old 07-23-2007, 03:10 PM   #1
matd
MatD
 
Join Date: Jun 2007
Posts: 13
matd is on a distinguished road
Default Memory leaks when rendering PolygonFeatures

I'm writing a plugin in C# that attempts to draw a large number of rectangles as PolygonFeatures. I have a thread that processes the packets of information via a socket where the data is decoded and drawn.

I use this data to create the placements for my rectangles and add them to a RenderableObjectList. Periodically, I need to clear the screen of these rectangle entities and I am trying to do so by .RemoveAll on the RenderableObjectList.

The entities clear the display, but I notice I am hemmoraging memory over time, actually quite quickly. I've taken care to .Dispose of objects in between that I no longer need but it hasn't helped. In fact, if I just comment out the single line of code where I added the PolygonFeature to the RenderableObjectList, I don't get a memory leak so I am certain it's not happening in a cursory part of the code.
matd is offline   Reply With Quote
Old 07-24-2007, 03:40 PM   #2
matd
MatD
 
Join Date: Jun 2007
Posts: 13
matd is on a distinguished road
Default

Some more information -

I am drawing PolygonFeatures, ModelFeatures and LineFeatures on the map as my entities. I noticed the ModelFeature entities also leak memory like the aforementioned problem. However, the LineFeatures do not, they are very stable with memory usage.

I took a look at the Dispose() method for each of these object types and noticed LineFeature sets a NeedsUpdate flag at Dispose time, and the other two object types do not (hence, they do not call the private Update method at Dispose time).
matd is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Out of memory with (not so many polygons) Unregistered Development Help 1 07-16-2007 01:50 AM
Memory leak associated with ModelFeature rghosh Bug Reports 0 03-21-2007 10:15 PM
Add memory cache to QuadTile maweifeng Developers' Corner 7 03-05-2007 01:46 PM
*** Memory Leak Question *** cmaxwell Developers' Corner 7 11-04-2004 10:51 PM


All times are GMT +1. The time now is 03:26 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.