MapPoint Forums

MapForums

Community of MapPoint and Virtual Earth Users and Developers




How do I release resources after a route is calculated

This is a discussion on How do I release resources after a route is calculated within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; I have written a server that accepts a batch of route requests and returns route maps and directions for each ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Today's Posts Twitter Feed Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-25-2006
Junior Member
White Belt
 
Join Date: Feb 2006
Posts: 2
How do I release resources after a route is calculated

I have written a server that accepts a batch of route requests and returns route maps and directions for each such requests. The problem is that everytime calculate() method is called the VM size of the process grows and calling the clear() method of the route does not seem to release all the allocated memory (The process grows by 500k each time for a route containing two waypoints and two pushpins). I even explicitly delete the waypoints and pushpins. I have tried to use newmap() between each requests and even called quit() method on the application object and instantiated a brand new one. None of these helped.

Are there any other datasets (e.g. directions) that need to be explicitly released and, if so, how.

Thx.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 02-26-2006
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,177
Hi,

yes. the same leak is in mappoint.exe also Hopfully it is solved in next version.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 02-26-2006
Junior Member
Yellow Belt
 
Join Date: Sep 2005
Posts: 22
Have you tried setting the objects you instantiated for the routes to NOTHING?

like:
Dim routeMap As MapPoint.Map
Dim objRoute As MapPoint.Route
Dim objSA As MapPoint.StreetAddress

then set them all to nothing at the end of the method

routeMap=NOTHING
objRoute=NOTHING
objSA = NOTHING
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 02-27-2006
Winwaed's Avatar
Mapping-Tools.com
Black Belt
 
Join Date: Feb 2004
Posts: 1,142
Blog Entries: 22
Wilfried, Rather than a memory leak, I think it is probably a case of lazy garbage collection?
Lazy from our point of view that is - for many situations it is probably just right.

Your trick with sending minimize/restore messages to MapPoint forces MapPoint to garbage collect. Doesn't work for in-process addins, but does work for external applications.

Richard
__________________
Winwaed Software Technology LLC
http://www.winwaed.com
See http://www.mapping-tools.com for MapPoint Tools
See the Geoweb Guru for online mapping
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 02-28-2006
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,177
Richard,

Thanks for your clear view (as always)

I think you ar right. I have a few servers doing almost nothing else than route calculation and they dont run out of memory...

I was to fast answering doing only a little test with too fast conclusions
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
calculated, release, resources, route


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

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not 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
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
Calculated route jumps off motorway carriageway Anonymous MapPoint 2006/2009 Discussion 8 10-21-2005 06:48 PM
Map-In-A-Box 2.0 Press Release Anonymous News and Announcements 0 03-16-2004 10:59 AM
GPS NavStar Version 3.0.0 Release dzhong News and Announcements 3 12-05-2003 10:09 PM
MP 2004 Release schedule Anonymous News and Announcements 5 08-02-2003 08:30 AM
Does anyone know of any good resources for using M.... Anonymous MapPoint 2006/2009 Discussion 1 06-12-2002 03:48 AM


All times are GMT -5. The time now is 11:19 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0 RC2
MP2K Magazine
Visitor Map

Menorca Holiday
Enjoy a Menorca holiday at a great rate when booked through UlookUbook!



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59