cocoa - NSTimer within NSThread Memory grows? -


I am using a timer within a thread, I am currently integrating the timer, however, when I see tool I see that the storage grows fast, I have no leak. I'm sure NSThread is causing the development? . I'm stopping the existing timer before running a new one and I'm releasing everything in my stop timer, but it's not sure why the memory still increases?

  - (zero) start timer {[view addSubview: timerBackground]; Timerthread = [[nastat alicock] initWithTarget: timer selector: @selector (startTimerThread) object: zero]; // Create a new thread [Start TimerStread]; // Start Thread / // Thread starts by sending this message - (Zero) Startup TieBrade {NSAITOriyPipal * Timer NSP = = [[NSAUTOriPipul Alok] IIT]; NSRunLoop * runLoop = [NSRunLoop currentRunLoop]; IsTimerRunning = Yes; NsTimer = [NSTimer scheduled timer with timer: 1.0 target: auto selector: @sillector (starttime :) user ink: zero repeats: yes]; [Run loop run]; [Timer Anspul release]; } - (zero) start time: (NSTimer *) theTimer {if (timeliness> 1) {--timeDuration; // [auto update text LB]; [Display TimerInterminethithread: @Selector (UpdateTextLL) with Object: Zero WaitUnunt Don: Yes]; } And {[timer stop timer]; If (Representative) [representative time ISUP]; }} - (zero) stop timer {isTimerRunning = NO; [NsTimer invalid]; [Timerthread release]; NsTimer = Zero; Timerbackground.php = 0.0; Timerbackground.fr = CGRactack (Timer2_BG_X - TIMER2_BG_WIDTH, TIMER2_BG_Y, TIMER2_BG_WIDTH, TIMER2_BG_HEIGHT); } - (zero) updateTextLbl {timeLabel.text = [NSString stringWithFormat: @ "% d", time duration]; }  

timertheread is running properly but you can Do not release NTTM in Stop timer . I agree that you store it in a property containing retention and then you will need release .


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -