MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




garbage collection

This is a discussion on garbage collection within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; I am having trouble with garbage collection, I wonder if anyone can help... Using MP2004 OCX, vb5 I've read the ...


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

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 07-02-2005
Junior Member
Yellow Belt
 
Join Date: Jun 2004
Posts: 15
garbage collection

I am having trouble with garbage collection, I wonder if anyone can help...
Using MP2004 OCX, vb5

I've read the articles about forcing garbage collection by using the Sendmessage API call, and getting the hwnd of the mappoint control via Sergiy Pavlov's code.

so I started with sergiys program http://www3.sympatico.ca/spavlov/mappoint_extended.zip
and added the deffinition
Public Const SC_MINIMIZE = &HF020

and a command button

Private Sub Command1_Click()
Dim TWnd As New TWindow
Dim lResult As Long

TWnd.hwnd = objMap.hWnd_Frame
lResult = SendMessage(TWnd.hwnd, WM_SYSCOMMAND, SC_MINIMIZE, 0)

End Sub

Clicking the button seems to do nothing, no minimise, no change in memory useage, what am I doing wrong?!
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 07-02-2005
Winwaed's Avatar
Mapping-Tools.com
Red Belt
 
Join Date: Feb 2004
Posts: 850
Blog Entries: 7
It may not work with a control.

Also that code finds the window by looking for a window with the correct title bar. So that needs a MapPoint application rather than a control.
(and you have to use the correctly title text)

You could try minimising the window that is holding the control? I don't know if that works, but it might force the control to minimise?
I suspect it won't, but it is definitely worth a try.


Richard
__________________
Winwaed Software Technology LLC
http://www.winwaed.com
See http://www.mapping-tools.com for MapPoint Tools
Pre-Order MapPoint 2009 today: http://www.mapping-tools.com/mappoint2009
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 07-04-2005
Junior Member
Yellow Belt
 
Join Date: Jun 2004
Posts: 15
thanks for the response.
Minimising the form deffinately does not work.
I have also tried using api calls to get the controls hwnd and snding a minimise to it, all to no avail.
This is cripling my software!
Any other suggestions?
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 07-04-2005
Winwaed's Avatar
Mapping-Tools.com
Red Belt
 
Join Date: Feb 2004
Posts: 850
Blog Entries: 7
I think you're in new territory here!

Another area where you can't force the garbage control using this method, is from an add-in.


One option might be to split your MapPoint working into two processes? The intensive memory-growing stuff is in an application?

Or to close and restart MapPoint on a regular basis?


Richard
__________________
Winwaed Software Technology LLC
http://www.winwaed.com
See http://www.mapping-tools.com for MapPoint Tools
Pre-Order MapPoint 2009 today: http://www.mapping-tools.com/mappoint2009
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 07-04-2005
Junior Member
Yellow Belt
 
Join Date: Jun 2004
Posts: 15
The whole thing is one large vb5 application, in use 24/7, with one momentary shutdown at 04:30. The problem with opening/closing the maps is that by the time they have a good few pushpins and shapes drawn the close/open process (on a p4 2.4Ghz, 512M RAM) is typicaly taking 5-10 seconds, which seriously irritates operators.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6 (permalink)  
Old 01-05-2007
Junior Member
White Belt
 
Join Date: Nov 2006
Posts: 4
Re: garbage collection

Hi,

I'm using MapPoint 2004 in an activeX control, and I need to execute garbage collection.

I'm using it in 2 separate application : 1 written en C# and the other in Java.

Questions :
- Is there better way to free memory than saving+opening the map, or sending a minimize message?
- If there is not, how to send a minimize/restore message in C# and Java?
- Will the MP memory usage be reduced by the OS when all RAM is used and the user then uses/launches other apps thus needing more memory? (If yes, I won't bother with this problem)

Thanks in advance for any help.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7 (permalink)  
Old 01-05-2007
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,105
Re: garbage collection

Hi,

You dont need to send/post a message, just set the property in your application if you use the activeX control:

Code:
WindowState = FormWindowState.Minimized;
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
collection, garbage


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
Garbage collection daxydoggie MapPoint 2006/2009 Discussion 3 05-04-2005 12:35 PM
This forum is GARBAGE !!! Anonymous MapPoint 2006/2009 Discussion 4 12-30-2004 01:53 PM
Garbage Anyone? daxydoggie MapPoint 2006/2009 Discussion 0 11-22-2004 10:16 AM
requested member of collection does not exist Anonymous MapPoint 2006/2009 Discussion 0 11-16-2004 07:22 AM
limiting objects in collection Anonymous MapPoint 2006/2009 Discussion 0 04-27-2004 07:52 AM


All times are GMT -5. The time now is 08:23 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map

Wengen Skiing
Wengen is known as one of those classic Swiss ski resorts that have a relaxed atmosphere and stunning scenery. Experience Wengen skiing holidays yourself, book online.

Flights to Portugal
Find and book flights to Portugal. Travel Counsellors can help with travel to Portugal including flights and accommodation.

Cheap Flight
Find cheap flights online at dealchecker.co.uk. We search the latest offers from the UK's leading Travel Agents, Tour Operators and Airlines.

Holidays to Cuba
For the best offers on holidays to Cuba, visit The Holiday Place today. Find a deal to suit you and your budget online!

Cheap Egypt Holidays
Pick up a bargain cheap Egypt holiday online when you visit ulookubook.com. Just check out our tips to make sure you book at the right time to get a great holiday for a great price. Finding cheap Egypt holidays can be simple when you know how.

Travel
Check out the travel options on Travel.co.uk.

Cheap Sharm Holidays
Get info on cheap Sharm holidays at On The Beach, and enjoy Egyptian nightlife!


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