Skip to content

Commit 7ebb280

Browse files
Fix a regression of a memory leak in Sessions. (#11802)
Co-authored-by: Andrew Heard <[email protected]>
1 parent a49058e commit 7ebb280

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

Crashlytics/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# 10.16.0
2+
- [fixed] Fixed a memory leak regression when generating session events (#11725).
3+
14
# 10.12.0
25
- [changed] Updated `upload-symbols` to version 3.16 with support for new default build settings in Xcode 15 (#11463)
36
- [changed] Re-enabled dSYM uploads for Flutter apps building with `--obfuscate` and updated instructions for de-obfuscating Dart stacktraces

FirebasePerformance/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# 10.16.0
2+
- [fixed] Fixed a memory leak regression when generating session events (#11725).
23
- [fixed] Fix Xcode 15 runtime warning (#11821).
34

45
# 10.12.0

FirebaseSessions/Sources/SessionStartEvent.swift

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ class SessionStartEvent: NSObject, GDTCOREventDataObject {
4141

4242
super.init()
4343

44+
// Note: If you add a proto string field here, remember to free it in the deinit.
4445
proto.event_type = firebase_appquality_sessions_EventType_SESSION_START
4546
proto.session_data.session_id = makeProtoString(sessionInfo.sessionId)
4647
proto.session_data.first_session_id = makeProtoString(sessionInfo.firstSessionId)
@@ -79,16 +80,18 @@ class SessionStartEvent: NSObject, GDTCOREventDataObject {
7980

8081
deinit {
8182
let garbage: [UnsafeMutablePointer<pb_bytes_array_t>?] = [
82-
proto.session_data.session_id,
83-
proto.session_data.first_session_id,
84-
proto.session_data.firebase_installation_id,
8583
proto.application_info.app_id,
86-
proto.application_info.session_sdk_version,
87-
proto.application_info.device_model,
88-
proto.application_info.development_platform_name,
89-
proto.application_info.development_platform_version,
84+
proto.application_info.apple_app_info.app_build_version,
9085
proto.application_info.apple_app_info.bundle_short_version,
9186
proto.application_info.apple_app_info.mcc_mnc,
87+
proto.application_info.development_platform_name,
88+
proto.application_info.development_platform_version,
89+
proto.application_info.device_model,
90+
proto.application_info.os_version,
91+
proto.application_info.session_sdk_version,
92+
proto.session_data.session_id,
93+
proto.session_data.firebase_installation_id,
94+
proto.session_data.first_session_id,
9295
]
9396
for pointer in garbage {
9497
nanopb_free(pointer)

0 commit comments

Comments
 (0)