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

memory leak with objloc.goto?

This is a discussion on memory leak with objloc.goto? within the MapPoint Desktop Discussion forums, part of the Map Forums category; I have a simple app that just refreshes on command a new location on the map. As i click the ...

  1. #1
    mzupan is offline Junior Member White Belt
    Join Date
    Jul 2003
    Posts
    1

    memory leak with objloc.goto?

    I have a simple app that just refreshes on command a new location on the map. As i click the button the mappoint process grows and grows.. can anyone see a problem in my code or is this a mappoint problem since it shouldnt be refreshed in under 15 seconds

    Code:
    Dim newlat
    Dim newlong
    Dim zoom
    Dim objpushpin As MapPointCtl.Pushpin
    Dim objLoc As MapPointCtl.Location
    Dim objMap As MapPointCtl.Map
    
    
    Private Sub Command1_Click()
        newlat = newlat + 0.0008
        newlong = newlong + 0.0008
        
        Set objMap = MappointControl1.ActiveMap
        Set objLoc = objMap.GetLocation(newlat, newlong, zoom)
        Set objpushpin.Location = objLoc
        objLoc.GoTo
        
        Set objMap = Nothing
        Set objLoc = Nothing
    End Sub
    
    Public Sub Form_Load()
    
        MappointControl1.NewMap 1
        
        Set objMap = MappointControl1.ActiveMap
        
        newlat = 42.67986
        newlong = -73.696918
        zoom = 1
        
        Set objLoc = objMap.GetLocation(newlat, newlong, zoom)
        Set objpushpin = objMap.AddPushpin(objLoc, "Current Location")
        objpushpin.Symbol = 82
        objLoc.GoTo
        
        Set objMap = Nothing
        Set objLoc = Nothing
        
    End Sub

  2. #2
    Victor_Chinn is offline Junior Member White Belt
    Join Date
    Aug 2003
    Posts
    2

    Re: memory leak with objloc.goto?

    Yep...I've noticed this too ... except I update every second and MapPoint eats up 4K every second. No response from Microsoft however ... perhaps this will be addressed in next version?



    Quote Originally Posted by mzupan
    I have a simple app that just refreshes on command a new location on the map. As i click the button the mappoint process grows and grows.. can anyone see a problem in my code or is this a mappoint problem since it shouldnt be refreshed in under 15 seconds

    Code:
    Dim newlat
    Dim newlong
    Dim zoom
    Dim objpushpin As MapPointCtl.Pushpin
    Dim objLoc As MapPointCtl.Location
    Dim objMap As MapPointCtl.Map
    
    
    Private Sub Command1_Click()
        newlat = newlat + 0.0008
        newlong = newlong + 0.0008
        
        Set objMap = MappointControl1.ActiveMap
        Set objLoc = objMap.GetLocation(newlat, newlong, zoom)
        Set objpushpin.Location = objLoc
        objLoc.GoTo
        
        Set objMap = Nothing
        Set objLoc = Nothing
    End Sub
    
    Public Sub Form_Load()
    
        MappointControl1.NewMap 1
        
        Set objMap = MappointControl1.ActiveMap
        
        newlat = 42.67986
        newlong = -73.696918
        zoom = 1
        
        Set objLoc = objMap.GetLocation(newlat, newlong, zoom)
        Set objpushpin = objMap.AddPushpin(objLoc, "Current Location")
        objpushpin.Symbol = 82
        objLoc.GoTo
        
        Set objMap = Nothing
        Set objLoc = Nothing
        
    End Sub

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Memory leak - Bulk calculates
    By bigderek in forum MapPoint Desktop Discussion
    Replies: 7
    Last Post: 10-08-2008, 07:50 AM
  2. Memory leaks in MapPoint
    By rbarthels in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 01-27-2004, 05:53 PM
  3. Location.Goto functionality, for freeform shapes?
    By Geomancer in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 12-16-2003, 08:42 AM
  4. Mappoint and VB.NET: Horrible Memory Usage
    By mrobold in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 11-12-2003, 06:16 PM
  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 28 29 30 31 32 33 34 35 36