]> Dogcows Code - chaz/openbox/blobdiff - obrender/render.c
Button proper freeing/newing.
[chaz/openbox] / obrender / render.c
index fb59e216928f4d7000f3e05a96ec178d810bc23a..cb698d6bdc3b040727641f5e00de8327ba8c030d 100644 (file)
@@ -231,6 +231,15 @@ void RrAppearanceClearTextures(RrAppearance *a)
     memset(a->texture, 0, a->textures * sizeof(RrTexture));
 }
 
+/* shallow copy means up the ref count and return it */
+RrAppearance *RrAppearanceCopyShallow(RrAppearance *orig)
+{
+    orig->ref++;
+    return orig;
+}
+
+/* deep copy of orig, means reset ref to 1 on copy
+ * and copy each thing memwise. */
 RrAppearance *RrAppearanceCopy(RrAppearance *orig)
 {
     RrSurface *spo, *spc;
@@ -316,6 +325,7 @@ RrAppearance *RrAppearanceCopy(RrAppearance *orig)
     return copy;
 }
 
+/* now decrements ref counter, and frees only if ref <= 0 */
 void RrAppearanceFree(RrAppearance *a)
 {
     if (a) {
This page took 0.019814 seconds and 4 git commands to generate.