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 to get rid of MapPoint.exe...

This is a discussion on How to get rid of MapPoint.exe... within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi there, I'm working with an ActiveX MapPoint(MapPoint 2004 Europe) control for a C# desktop application. Whenever I run my ...

  1. #1
    Learner is offline Junior Member Yellow Belt
    Join Date
    Feb 2006
    Posts
    18

    How to get rid of MapPoint.exe...

    Hi there,
    I'm working with an ActiveX MapPoint(MapPoint 2004 Europe) control for a C# desktop application. Whenever I run my application MapPoint.exe starts running and whenever I stop and clears it by writing
    if (this.ctlMap != null)
    {
    this.ctlMap.ActiveMap.Saved = true; this.ctlMap.ActiveMap.Application.Quit();
    }
    it still continues to run and doesn't clear from memory.
    Any help will be highly appreciated.
    Regards
    Learn from cradle to the grave

  2. #2
    Winwaed's Avatar
    Winwaed is offline Mapping-Tools.com Black Belt
    Join Date
    Feb 2004
    Location
    Irving,Texas
    Posts
    1,859
    Blog Entries
    60
    You have to de-allocate (or de-reference) every single MapPoint object that you have used. This includes all those little Location objects that tend to get used a lot.

    Basically, MapPoint won't disappear until all of its objects have been de-allocated or no longer have references to them.


    Richard
    Winwaed Software Technology LLC
    http://www.winwaed.com
    See http://www.mapping-tools.com for MapPoint Tools

  3. #3
    Learner is offline Junior Member Yellow Belt
    Join Date
    Feb 2006
    Posts
    18
    Hi,
    Would you be kind to guide how to clear/dereference the COM objects? Whether I'd have to write wraper classes for them or is there any other smart solution to handle? Please guide and oblige.
    Regards
    Learn from cradle to the grave

  4. #4
    Elbarto is offline Junior Member Yellow Belt
    Join Date
    Mar 2006
    Posts
    13
    Hi,

    simply do this:

    public class Test
    {
    private MapPoint.Application app; // mappoint object

    //constructor
    public Test(object application)
    {
    app = application as MapPoint.Application;

    }

    ///......

    //then when application exits do this:

    app=null; // and your mappoint object will be destroy

    //you must do this for all of type of mappoint object ( map, application etc... )

    }

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

    If you use the ActiveX control in C# then mappoint.exe is removed from memroy when your application quit. However when you stop debugging or when your program quit ungracefull with an exeption then there could be instances still running. This can of course happen while developping.

    But if your program quit on a normal way there is nothing to do.

Thread Information

Users Browsing this Thread

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

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