Hi
From within a VB app how do you cause a global memory compaction or free
up as per the many memory freeing applications?
Can you say via VB to windows to clean-up/ free up memory used by just one
application?
I have been looking for an example but thus far can't find one!
Thanks 6 1587
Hi Adrian,
If you are referring to VB.NET (and not VB6), the memory is automatically
managed and you don´t have to worry about that, the operating system signals
applications when the system is low on memory and .NET applications free
memory. You can force it on your .NET application calling
System.GC.Collect().
--
Best regards,
Carlos J. Quintero
MZ-Tools: Productivity add-ins for Visual Studio
You can code, design and document much faster: http://www.mztools.com
"Adrian" <Ad****@nospamhotmail.com.uk> escribió en el mensaje
news:du**********@nwrdmz03.dmz.ncs.ea.ibs-infra.bt.com... Hi From within a VB app how do you cause a global memory compaction or free up as per the many memory freeing applications?
Can you say via VB to windows to clean-up/ free up memory used by just one application?
I have been looking for an example but thus far can't find one!
Thanks
Thanks the app is dotnet But the memory clean up is not for this app its for
an older app! I was hoping to write a simple clean up app that would cause
either a garbage collection for the one app or system wide which I would
trigger from my VB.Net app.
System.GC.Collect() is this system wide or just for dotnet apps?
Thanks
"Carlos J. Quintero [VB MVP]" <ca*****@NOSPAMsogecable.com> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl... Hi Adrian,
If you are referring to VB.NET (and not VB6), the memory is automatically managed and you don´t have to worry about that, the operating system signals applications when the system is low on memory and .NET applications free memory. You can force it on your .NET application calling System.GC.Collect().
--
Best regards,
Carlos J. Quintero
MZ-Tools: Productivity add-ins for Visual Studio You can code, design and document much faster: http://www.mztools.com
"Adrian" <Ad****@nospamhotmail.com.uk> escribió en el mensaje news:du**********@nwrdmz03.dmz.ncs.ea.ibs-infra.bt.com... Hi From within a VB app how do you cause a global memory compaction or free up as per the many memory freeing applications?
Can you say via VB to windows to clean-up/ free up memory used by just one application?
I have been looking for an example but thus far can't find one!
Thanks
System.GC.Collect only affects to your own .NET app.
For your purpose, see the WM_COMPACTING Win32 message: http://msdn.microsoft.com/library/de...compacting.asp
--
Best regards,
Carlos J. Quintero
MZ-Tools: Productivity add-ins for Visual Studio
You can code, design and document much faster: http://www.mztools.com
"Adrian" <Ad****@nospamhotmail.com.uk> escribió en el mensaje
news:du**********@nwrdmz03.dmz.ncs.ea.ibs-infra.bt.com... Thanks the app is dotnet But the memory clean up is not for this app its for an older app! I was hoping to write a simple clean up app that would cause either a garbage collection for the one app or system wide which I would trigger from my VB.Net app.
System.GC.Collect() is this system wide or just for dotnet apps?
Thanks
"Carlos J. Quintero [VB MVP]" <ca*****@NOSPAMsogecable.com> wrote in message news:%2***************@TK2MSFTNGP11.phx.gbl... Hi Adrian,
If you are referring to VB.NET (and not VB6), the memory is automatically managed and you don´t have to worry about that, the operating system signals applications when the system is low on memory and .NET applications free memory. You can force it on your .NET application calling System.GC.Collect().
--
Best regards,
Carlos J. Quintero
MZ-Tools: Productivity add-ins for Visual Studio You can code, design and document much faster: http://www.mztools.com
"Adrian" <Ad****@nospamhotmail.com.uk> escribió en el mensaje news:du**********@nwrdmz03.dmz.ncs.ea.ibs-infra.bt.com... Hi From within a VB app how do you cause a global memory compaction or free up as per the many memory freeing applications?
Can you say via VB to windows to clean-up/ free up memory used by just one application?
I have been looking for an example but thus far can't find one!
Thanks
Thanks Carlos
How do you send such messages fom VB.net?
"Carlos J. Quintero [VB MVP]" <ca*****@NOSPAMsogecable.com> wrote in message
news:ej**************@TK2MSFTNGP14.phx.gbl... System.GC.Collect only affects to your own .NET app.
For your purpose, see the WM_COMPACTING Win32 message:
http://msdn.microsoft.com/library/de...compacting.asp --
Best regards,
Carlos J. Quintero
MZ-Tools: Productivity add-ins for Visual Studio You can code, design and document much faster: http://www.mztools.com
"Adrian" <Ad****@nospamhotmail.com.uk> escribió en el mensaje news:du**********@nwrdmz03.dmz.ncs.ea.ibs-infra.bt.com... Thanks the app is dotnet But the memory clean up is not for this app its for an older app! I was hoping to write a simple clean up app that would cause either a garbage collection for the one app or system wide which I would trigger from my VB.Net app.
System.GC.Collect() is this system wide or just for dotnet apps?
Thanks
"Carlos J. Quintero [VB MVP]" <ca*****@NOSPAMsogecable.com> wrote in message news:%2***************@TK2MSFTNGP11.phx.gbl... Hi Adrian,
If you are referring to VB.NET (and not VB6), the memory is automatically managed and you don´t have to worry about that, the operating system signals applications when the system is low on memory and .NET applications free memory. You can force it on your .NET application calling System.GC.Collect().
--
Best regards,
Carlos J. Quintero
MZ-Tools: Productivity add-ins for Visual Studio You can code, design and document much faster: http://www.mztools.com
"Adrian" <Ad****@nospamhotmail.com.uk> escribió en el mensaje news:du**********@nwrdmz03.dmz.ncs.ea.ibs-infra.bt.com... Hi From within a VB app how do you cause a global memory compaction or free up as per the many memory freeing applications?
Can you say via VB to windows to clean-up/ free up memory used by just one application?
I have been looking for an example but thus far can't find one!
Thanks
ok done this:
Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hWnd
As Long, ByVal wMsg As Long, ByVal wParam As Integer, ByVal lParam As Long)
As Long
Sub Main()
Dim myresult As Long
myresult = PostMessage(-1, 65, 0, 0)
MsgBox(myresult.ToString)
End Sub
but it still does not free the memory used by the old app applications such
as MEMORyAL 4.2.1
do, how do they do it?
"Adrian" <Ad****@nospamhotmail.com.uk> wrote in message
news:du**********@nwrdmz03.dmz.ncs.ea.ibs-infra.bt.com... Thanks Carlos How do you send such messages fom VB.net?
"Carlos J. Quintero [VB MVP]" <ca*****@NOSPAMsogecable.com> wrote in message news:ej**************@TK2MSFTNGP14.phx.gbl... System.GC.Collect only affects to your own .NET app.
For your purpose, see the WM_COMPACTING Win32 message:
http://msdn.microsoft.com/library/de...compacting.asp --
Best regards,
Carlos J. Quintero
MZ-Tools: Productivity add-ins for Visual Studio You can code, design and document much faster: http://www.mztools.com
"Adrian" <Ad****@nospamhotmail.com.uk> escribió en el mensaje news:du**********@nwrdmz03.dmz.ncs.ea.ibs-infra.bt.com... Thanks the app is dotnet But the memory clean up is not for this app its for an older app! I was hoping to write a simple clean up app that would cause either a garbage collection for the one app or system wide which I would trigger from my VB.Net app.
System.GC.Collect() is this system wide or just for dotnet apps?
Thanks
"Carlos J. Quintero [VB MVP]" <ca*****@NOSPAMsogecable.com> wrote in message news:%2***************@TK2MSFTNGP11.phx.gbl... Hi Adrian,
If you are referring to VB.NET (and not VB6), the memory is automatically managed and you don´t have to worry about that, the operating system signals applications when the system is low on memory and .NET applications free memory. You can force it on your .NET application calling System.GC.Collect().
--
Best regards,
Carlos J. Quintero
MZ-Tools: Productivity add-ins for Visual Studio You can code, design and document much faster: http://www.mztools.com
"Adrian" <Ad****@nospamhotmail.com.uk> escribió en el mensaje news:du**********@nwrdmz03.dmz.ncs.ea.ibs-infra.bt.com... > Hi > From within a VB app how do you cause a global memory compaction or > free up as per the many memory freeing applications? > > Can you say via VB to windows to clean-up/ free up memory used by just > one application? > > I have been looking for an example but thus far can't find one! > > > Thanks >
"Adrian" <Ad****@nospamhotmail.com.uk> schrieb ok done this:
Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Integer, ByVal lParam As Long) As Long
This declaration is for VB6.
VB.Net declaration:
Public Declare Function PostMessage Lib "user32" Alias "PostMessageA" _
(ByVal hwnd As IntPtr, ByVal wMsg As Integer, _
ByVal wParam As IntPtr, ByVal lParam As IntPtr) As Boolean
I only corrected the declaration. I don't know if this solves the problem.
(see also System.Windows.Forms.Message)
Armin This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Dave |
last post by:
Hi,
We have an application that uses an Access 2000 MDB file to store various
data, a customer had a problem where during the compaction routine the
database was corrupted, they informed us that...
|
by: darcykahle |
last post by:
I have stumbled upon an interesting issue with regard to compaction of
an access frontend database which resides on a DFS target that utilizes
FRS to mirror the sharepoint, and I was wondering if...
|
by: Riley DeWiley |
last post by:
I am using Jet 4.0 through OLEDB and C++.
My travails with compaction are well known to regular readers of this NG.
Many of my problems were solved by disabling record locking.
I am now...
|
by: Riley DeWiley |
last post by:
There is a way to ask a data source how much space would be freed if
compaction were to be done. I saw the reference, but now cannot find it.
Anyone know where that web page was? Even Google has...
|
by: Ben Lam |
last post by:
I read on some message board that i can't find anymore saying that the Large
Object Heap is compacted in Framework 1.1 or 2.0. Is this true? I can't seem
to find any ms documentation that said...
|
by: Michael D. Ober |
last post by:
OK, I can't figure out a way to optimize the following VB 2005 code using
StringBuilders:
Public Const RecSize as Integer = 105
Private buffer As String
Public Sub New()
init
End Sub...
|
by: rharding |
last post by:
I have a process which runs automatically once a day looping through a set of table names deleting all the data from the table (DoCmd.RunSQL "DELETE * FROM " & MyQry!Name) and then importing data...
|
by: Born |
last post by:
GC is really garbage itself
Reason 1:
There is delay between the wanted destruction and the actual destruction.
|
by: Lloyd Bonafide |
last post by:
I followed a link to James Kanze's web site in another thread and was
surprised to read this comment by a link to a GC:
"I can't imagine writing C++ without it"
How many of you c.l.c++'ers use...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |