Skip to content

Commit 925078c

Browse files
authored
Add log statement if the shared pointer ref count is not 0
1 parent 342eae0 commit 925078c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/gstreamer/gstkvssink.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -815,6 +815,10 @@ gst_kvs_sink_finalize(GObject *object) {
815815
kvssink->credentials_.reset();
816816
kvssink->data.reset();
817817

818+
if (kvssink->data.use_count() > 0) {
819+
LOG_ERROR("KvsSinkCustomData is not properly cleaned up. The ref count is: " << kvssink->data.use_count());
820+
}
821+
818822
// Eventually calls g_free(kvssink), smart pointers need to be cleaned up before
819823
G_OBJECT_CLASS (parent_class)->finalize(object);
820824
}

0 commit comments

Comments
 (0)