Best way to use a timer

Do you need something made? then ask in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
3 posts Page 1 of 1
Contributors
User avatar
Dummy1912
VIP - Donator
VIP - Donator
Posts: 1969
Joined: Sat Aug 21, 2010 2:17 pm

Best way to use a timer
Dummy1912
Hello,

i was wondering if somebody can show me
the best way to use a Timer without using to much of the cpu or memory

because i have noticed that if a timer keeps running every few minutes to check a sub the cpu / memory gets really high

Thank you

Regards,

Dummy1912
visit us on:


http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
User avatar
visualtech
VIP - Donator
VIP - Donator
Posts: 265
Joined: Sat Nov 19, 2011 2:19 pm

Re: Best way to use a timer
visualtech
According to my analysis, using multiple thread pools is the apt solution as it prevents any memory lock and memory leak.
Image
User avatar
Dummy1912
VIP - Donator
VIP - Donator
Posts: 1969
Joined: Sat Aug 21, 2010 2:17 pm

Re: Best way to use a timer
Dummy1912
Hello,

In my old application i ever used this thread before
and must say takes lots of cpu and memory
Code: Select all
DemoThread = New Thread( _
        New ThreadStart(AddressOf Me.GetSub)
                    DemoThread.Start()
Code: Select all
Public Sub GetSub()
        While Me.Visible
                            For Each item As Control In Panel1.Controls
                    CType(item, listed).GetDemo()
                Next
        End While
    End Sub
Regards,
Dummy1912
visit us on:


http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
3 posts Page 1 of 1
Return to “Tutorial Requests”