|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Menory compactionHi
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 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(). -- Show quoteHide quoteBest 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" <Adrian@nospamhotmail.com.uk> escribió en el mensaje news:du1il3$mjh$1@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 Show quoteHide quote "Carlos J. Quintero [VB MVP]" <carlosq@NOSPAMsogecable.com> wrote in message news:%23IbBUpGPGHA.344@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" <Adrian@nospamhotmail.com.uk> escribió en el mensaje > news:du1il3$mjh$1@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/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowreference/windowmessages/wm_compacting.asp -- Show quoteHide quoteBest 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" <Adrian@nospamhotmail.com.uk> escribió en el mensaje news:du1jk5$oq2$1@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]" <carlosq@NOSPAMsogecable.com> wrote in > message news:%23IbBUpGPGHA.344@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" <Adrian@nospamhotmail.com.uk> escribió en el mensaje >> news:du1il3$mjh$1@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? Show quoteHide quote "Carlos J. Quintero [VB MVP]" <carlosq@NOSPAMsogecable.com> wrote in message news:ejCFCLHPGHA.2012@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/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowreference/windowmessages/wm_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" <Adrian@nospamhotmail.com.uk> escribió en el mensaje > news:du1jk5$oq2$1@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]" <carlosq@NOSPAMsogecable.com> wrote in >> message news:%23IbBUpGPGHA.344@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" <Adrian@nospamhotmail.com.uk> escribió en el mensaje >>> news:du1il3$mjh$1@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? Show quoteHide quote "Adrian" <Adrian@nospamhotmail.com.uk> wrote in message news:du1s56$ebi$1@nwrdmz03.dmz.ncs.ea.ibs-infra.bt.com... > Thanks Carlos > How do you send such messages fom VB.net? > > > "Carlos J. Quintero [VB MVP]" <carlosq@NOSPAMsogecable.com> wrote in > message news:ejCFCLHPGHA.2012@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/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowreference/windowmessages/wm_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" <Adrian@nospamhotmail.com.uk> escribió en el mensaje >> news:du1jk5$oq2$1@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]" <carlosq@NOSPAMsogecable.com> wrote in >>> message news:%23IbBUpGPGHA.344@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" <Adrian@nospamhotmail.com.uk> escribió en el mensaje >>>> news:du1il3$mjh$1@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" <Adrian@nospamhotmail.com.uk> schrieb This declaration is for VB6. > 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 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
View Source from WebBrowser (2005)
Help authoring tool for Windows app? OO & Interface question Please help with an 'impossible' error! function to convert string to 1 dimensional array of long IIF in vb.net acts weird.. or is it me Using the && operator in generated JavaScript Web service - business objects don't show up FTP with SSH Eventhandler |
|||||||||||||||||||||||