After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 763309 - ahcsrc: add finalize function
ahcsrc: add finalize function
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Mac OS
: Normal normal
: 1.9.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-03-08 11:51 UTC by Justin Kim
Modified: 2016-05-31 11:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
add finalize (1.82 KB, patch)
2016-03-08 11:52 UTC, Justin Kim
none Details | Review
move resource finalization to finalize (1.86 KB, patch)
2016-05-31 10:12 UTC, Justin Kim
committed Details | Review

Description Justin Kim 2016-03-08 11:51:57 UTC
dispose function can be called multiple times in theory, checking NULL or setting NULL is required in the function.
Comment 1 Justin Kim 2016-03-08 11:52:30 UTC
Created attachment 323384 [details] [review]
add finalize
Comment 2 Sebastian Dröge (slomo) 2016-03-08 12:09:10 UTC
Comment on attachment 323384 [details] [review]
add finalize

Why not just move everything from dispose() to finalize() here? There's no need to have it in dispose().

Also g_mutex_clear() should be safe to call on an already cleared mutex.
Comment 3 Justin Kim 2016-05-31 10:12:45 UTC
Created attachment 328787 [details] [review]
move resource finalization to finalize

I'm sorry I almost forgot this.
Comment 4 Tim-Philipp Müller 2016-05-31 11:58:31 UTC
Thanks!

commit fe62233b83840ae738871ef78d7dd814de8690ca
Author: Justin Kim <justin.kim@collabora.com>
Date:   Tue May 31 18:58:43 2016 +0900

    ahcsrc: release resources in 'finalize' function
    
    In general, 'dispose' function is used for dropping all references
    and 'finalize' is called for releasing instances.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=763309