Skip to content

Commit

Permalink
fix(profiling): implicit autorelease pool retain cycle (#4682)
Browse files Browse the repository at this point in the history
  • Loading branch information
armcknight authored Jan 8, 2025
1 parent 24052e9 commit d7cec05
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@

### Fixes

- Memory growth issue in profiler (#4682)
- Replace occurences of `strncpy` with `strlcpy` (#4636)
- Fix span recording for `NSFileManager.createFileAtPath` starting with iOS 18, macOS 15 and tvOS 18. This feature is experimental and must be enabled by setting the option `experimental.enableFileManagerSwizzling` to `true` (#4634)

4 changes: 3 additions & 1 deletion Sources/Sentry/SentryProfiler.mm
Original file line number Diff line number Diff line change
@@ -170,7 +170,9 @@ - (void)start
Backtrace backtraceCopy = backtrace;
backtraceCopy.absoluteTimestamp
= SentryDependencyContainer.sharedInstance.dateProvider.systemTime;
[state appendBacktrace:backtraceCopy];
@autoreleasepool {
[state appendBacktrace:backtraceCopy];
}
},
kSentryProfilerFrequencyHz);
_samplingProfiler->startSampling();

0 comments on commit d7cec05

Please sign in to comment.