| 256 | } |
| 257 | |
| 258 | gtl::InlinedVector<AllocRecord, 4> TrackingAllocator::GetRecordsAndUnRef() { |
| 259 | bool should_delete; |
| 260 | gtl::InlinedVector<AllocRecord, 4> allocations; |
| 261 | { |
| 262 | mutex_lock lock(mu_); |
| 263 | allocations.swap(allocations_); |
| 264 | should_delete = UnRef(); |
| 265 | } |
| 266 | if (should_delete) { |
| 267 | delete this; |
| 268 | } |
| 269 | return allocations; |
| 270 | } |
| 271 | |
| 272 | gtl::InlinedVector<AllocRecord, 4> TrackingAllocator::GetCurrentRecords() { |
| 273 | gtl::InlinedVector<AllocRecord, 4> allocations; |