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 2 of 2

Releasing Memory when finished with mapoint via .net

This is a discussion on Releasing Memory when finished with mapoint via .net within the MapPoint Desktop Discussion forums, part of the Map Forums category; I have an .NET application which starts mappoint puts somes pins on a map and then shows the mapoint application ...

  1. #1
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137

    Releasing Memory when finished with mapoint via .net

    I have an .NET application which starts mappoint puts somes pins on a map and then shows the mapoint application to the user, everything works fine except with repeated calls the function I have noticed Mapoint stas in memory even though I am setting the object to nothing does anyone one have any suggestions that might get around this.
    any replies to rich_crittenden@hotmail.com please. in anticipation thanks.

  2. #2
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137
    Do you call the .Select() method on the pushpin object?

    If yes, try this :

    It's seems to release the COM object.

    Dominic Morin, MCP
    dominic.morin@optimarketing.com

    Code:
    MapPoint.Pushpin pin = null;
    
    ...
    
    Utilities.NAR(pin);
    pin = null;
    Code:
    public class Utilities
    {
            public static void NAR(object o)
            {
                try
                {
                    Marshal.ReleaseComObject(o);
                }
                catch
                {
                }
                finally
                {
                    o = null;
                }
            }
    }

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. how to calculate de starting and finished point on a route
    By hidroela in forum MapPoint Desktop Discussion
    Replies: 5
    Last Post: 02-06-2005, 05:30 PM
  2. Memory leaks in MapPoint
    By rbarthels in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 01-27-2004, 05:53 PM
  3. Mappoint and VB.NET: Horrible Memory Usage
    By mrobold in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 11-12-2003, 06:16 PM
  4. memory leak with objloc.goto?
    By mzupan in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 08-02-2003, 01:14 AM
  5. Huge memory leak in using QueryShape?
    By random0000 in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 03-28-2003, 06:22 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