mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
libsysprof: try to break cycles at end of recording
This commit is contained in:
@ -324,6 +324,12 @@ stop_recording:
|
||||
/* Clear buffers and ensure the disk layer has access to them */
|
||||
sysprof_capture_writer_flush (self->writer);
|
||||
|
||||
/* Aggressively release our instruments so if they have references back
|
||||
* to the recording any reference cycles are broken.
|
||||
*/
|
||||
if (self->instruments->len > 0)
|
||||
g_ptr_array_remove_range (self->instruments, 0, self->instruments->len);
|
||||
|
||||
/* Ignore error types we use to bail out of loops */
|
||||
if (error != NULL &&
|
||||
!g_error_matches (error, DEX_ERROR, DEX_ERROR_TIMED_OUT) &&
|
||||
|
||||
Reference in New Issue
Block a user