views:

31

answers:

1

I am developing an application for blackberry.I have a timer,when i declare it as static,& clsoe the timer after certain interval,it works,bt if i dnt declare the timer as static,then if the call timer.cancel(),the timer is not closed.Why this is happening.

A: 

At a wild guess I would say you are closing the timer from a different instance of the class it is part of. When it's static they are the same timer. When it isn't, it isn't.

DJClayworth