[gtksourceview/wip/chergert/gsv-gtk4: 112/172] doc: update HACKING for ownership transfer
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview/wip/chergert/gsv-gtk4: 112/172] doc: update HACKING for ownership transfer
- Date: Thu, 14 May 2020 02:11:03 +0000 (UTC)
commit 96c6e28a9e3678acc30d42b33607e4a371600e7a
Author: Christian Hergert <chergert redhat com>
Date: Fri Jan 17 13:40:05 2020 -0800
doc: update HACKING for ownership transfer
HACKING | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/HACKING b/HACKING
index 237793de..f499c922 100644
--- a/HACKING
+++ b/HACKING
@@ -142,6 +142,9 @@ Here are some general advices:
validate invariants. These are used in debug builds but can be compiled
out of production/release builds.
+ - When transfering ownership of an object or struct, use g_steal_pointer()
+ to make it clear when reading that ownership was transfered.
+
See also:
https://blogs.gnome.org/swilmet/2012/08/01/about-code-quality-and-maintainability/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]