Skip to content

Commit

Permalink
Merge pull request #68 from meitu/feature/bugfix
Browse files Browse the repository at this point in the history
Feature/bugfix
  • Loading branch information
haowenwu authored Sep 28, 2020
2 parents 727eb56 + d26c4b5 commit 00d6dce
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions MTHawkeye.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "MTHawkeye"
s.version = "0.12.2"
s.version = "0.12.3"
s.summary = "Profiling/Debugging assist tools for iOS."

s.description = <<-DESC
Expand Down Expand Up @@ -373,7 +373,7 @@ Pod::Spec.new do |s|
ui.dependency 'MTHawkeye/NetworkPlugins/Monitor'
ui.dependency 'MTHawkeye/NetworkPlugins/Inspect'
ui.dependency 'MTHawkeye/UISkeleton'
ui.dependency 'FLEX'
ui.dependency 'FLEX', '4.1.1'
ui.libraries = "sqlite3"
ui.framework = 'QuartzCore'
end
Expand Down
6 changes: 5 additions & 1 deletion MTHawkeye/EnergyPlugins/CPUTrace/Core/MTHCPUTrace.mm
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,11 @@ - (void)changeTimerIntervalTo:(CGFloat)timerIntervalInSec {

- (void)stopTimerIfNeed {
if (self.cpuTracingTimer) {
dispatch_source_cancel(self.cpuTracingTimer);
__block dispatch_source_t strongTimer = self.cpuTracingTimer;
dispatch_source_set_cancel_handler(self.cpuTracingTimer, ^{
strongTimer = nil; // dealloc the timer until it is cancelled
});
dispatch_source_cancel(self.cpuTracingTimer); // this is asyncronously
self.cpuTracingTimer = nil;
}
}
Expand Down

0 comments on commit 00d6dce

Please sign in to comment.