Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 5 of 5

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 Desktop 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 ...

  1. #1
    sassan_ebadi@yahoo.com is offline 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.

  2. #2
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    Hi,

    yes. the same leak is in mappoint.exe also Hopfully it is solved in next version.

  3. #3
    oxcarz is offline 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

  4. #4
    Winwaed's Avatar
    Winwaed is offline Mapping-Tools.com Black Belt
    Join Date
    Feb 2004
    Location
    Irving,Texas
    Posts
    1,859
    Blog Entries
    60
    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

  5. #5
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    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

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


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 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96