Threading problem

Jan 28 2005 2:34 AM
hello, In my project i'm having a seperate class(Memory) for reducing the memory consumption function. I'm not able to create and start the threading concept. I used the following coding to create the thread but it shows me an error in the addressof operator stating that " Signature of Savememory function doesn't suits with Threadstart delegate signature. " 'This class utilizes the reduce memory function Public Class Memory Private Declare Function SetProcessWorkingSetSize Lib "kernel32.dll" (ByVal hProcess As IntPtr, ByVal dwMinimumWorkingSetSize As Int32, ByVal dwMaximumWorkingSetSize As Int32) As Int32 Public Shared Function SaveMemory() As Int32 Return SetProcessWorkingSetSize(Process.GetCurrentProcess().Handle, -1, -1) End Function End Class I have written the code as follows:- Imports System.Threading Form1.vb 'Form1_Load Dim mem As New Memory() Dim t As New ThreadStart(AddressOf mem.SaveMemory) Dim ts As New Thread(t) ts.Start() end sub I don't know how to resolve these problem Urgent Pls help Thanx in advance vidhya