Skip to content

Commit 298f847

Browse files
author
Donatien Garnier
committed
Fix use_count() in SharedPtr
1 parent 7086d69 commit 298f847

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

platform/SharedPtr.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,9 @@ class SharedPtr {
175175
{
176176
if (_ptr != NULL) {
177177
core_util_critical_section_enter();
178-
return *_counter;
178+
uint32_t current_counter = *_counter;
179179
core_util_critical_section_exit();
180+
return current_counter;
180181
} else {
181182
return 0;
182183
}

0 commit comments

Comments
 (0)