Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best way to remove a timer
Message
From
04/03/1997 22:40:41
 
 
To
04/03/1997 22:19:28
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00022879
Message ID:
00022881
Views:
39
>In my timer event, depending on some conditions, I need to remove the objec from memory.
>
>My object is oApp.oTimer.
>
>What will be the best way to remove it from memory?
>
>I tried This.Destroy() but it does not do the job. Also, there isn't a Release() method for the timer object.

Add a Release method to your timer class:

This.Enabled=.f.
release This

I highly recomend you to have the This.Enabled=.f. statement. I don't know excatly (!!:)) why, but you can have some very strange behaviors if you don't do it.

Vlad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform