Timer Self Destruction?

Non-platform specific questions.

Timer Self Destruction?

Postby jazz_e_bob » Thu Apr 22, 2004 9:51 am

I create a timer that repeats with a specified quantity.

Will the timer destroy itself after the timer event has happened?

Image
Controlling complexity is the essence of computer programming.
User avatar
jazz_e_bob
 
Posts: 742
Joined: Tue Jul 01, 2003 9:38 pm
Location: Bloke from Cockatoo Creek Australia
Score: 14 Give a positive score

Postby ingsan » Thu Apr 22, 2004 1:16 pm

Hello !
The answer is no, the timer will not destroy itself after Event. Actually it will loop itself until you decide to destroy it.
So declare that AfterEvent > Destroy(YourTimer)

See you :)
User avatar
ingsan
 
Posts: 580
Joined: Mon Nov 17, 2003 4:02 pm
Location: Maurician LADY in FRANCE
Score: 6 Give a positive score

Postby Just4Fun » Thu Apr 22, 2004 2:15 pm

ingsan's post seems correct to me. I believe that you need to destroy your timers after the event where they are no longer needed.
I've learned that I still have a lot to learn.

** Makslane == Genious **
Just4Fun
 
Posts: 524
Joined: Tue Jul 01, 2003 5:19 am
Location: USA: Washington State; West Coast
Score: 6 Give a positive score

Postby ingsan » Thu Apr 22, 2004 6:05 pm

Yes, I encountered this same problem before.

Ex :
    I have MainActor
    On DestroyActor, create TimerA
    On TimerA, create MainActor.


If you don't destroy TimerA, MainActor will be forever created after TimerA :(

:mrgreen:
User avatar
ingsan
 
Posts: 580
Joined: Mon Nov 17, 2003 4:02 pm
Location: Maurician LADY in FRANCE
Score: 6 Give a positive score

Postby jazz_e_bob » Thu Apr 22, 2004 7:50 pm

But what if I have a timer that repeats only once?

I suppose it must stay in memory until destroyed by code...

8)
Controlling complexity is the essence of computer programming.
User avatar
jazz_e_bob
 
Posts: 742
Joined: Tue Jul 01, 2003 9:38 pm
Location: Bloke from Cockatoo Creek Australia
Score: 14 Give a positive score

Postby ingsan » Thu Apr 22, 2004 10:00 pm

You're right, a timer with specified quantity repeats only the specified time :idea:
Ooops :oops:
User avatar
ingsan
 
Posts: 580
Joined: Mon Nov 17, 2003 4:02 pm
Location: Maurician LADY in FRANCE
Score: 6 Give a positive score

Postby makslane » Thu Apr 22, 2004 11:14 pm

A timer with specified quantity repeats will be destroyed after the specified count
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby jazz_e_bob » Fri Apr 23, 2004 3:44 am

You da man Makslane!
Image
Controlling complexity is the essence of computer programming.
User avatar
jazz_e_bob
 
Posts: 742
Joined: Tue Jul 01, 2003 9:38 pm
Location: Bloke from Cockatoo Creek Australia
Score: 14 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest