glibmm r645 - in trunk: . gio/src
- From: murrayc svn gnome org
- To: svn-commits-list gnome org
- Subject: glibmm r645 - in trunk: . gio/src
- Date: Fri, 28 Mar 2008 16:31:17 +0000 (GMT)
Author: murrayc
Date: Fri Mar 28 16:31:17 2008
New Revision: 645
URL: http://svn.gnome.org/viewvc/glibmm?rev=645&view=rev
Log:
2008-03-28 Murray Cumming <murrayc murrayc com>
* gio/src/file.ccg: create(), replace(): Do not take an extra reference,
because the C function has given us a new instance with an initial
reference. The leak stopped the stream from really replacing the file,
because that only happens when it is closed.
Modified:
trunk/ChangeLog
trunk/gio/src/file.ccg
Modified: trunk/gio/src/file.ccg
==============================================================================
--- trunk/gio/src/file.ccg (original)
+++ trunk/gio/src/file.ccg Fri Mar 28 16:31:17 2008
@@ -287,7 +287,7 @@
#endif //GLIBMM_EXCEPTIONS_ENABLED
if(retvalue)
- retvalue->reference(); //The function does not do a ref for us.
+ retvalue->reference(); //The function does not do a ref for us. //TODO: Or maybe it's a new instance. murrayc.
return retvalue;
}
@@ -308,7 +308,7 @@
#endif //GLIBMM_EXCEPTIONS_ENABLED
if(retvalue)
- retvalue->reference(); //The function does not do a ref for us.
+ retvalue->reference(); //The function does not do a ref for us. //TODO: Or maybe it's a new instance. murrayc.
return retvalue;
}
@@ -370,7 +370,7 @@
#endif //GLIBMM_EXCEPTIONS_ENABLED
if(retvalue)
- retvalue->reference(); //The function does not do a ref for us.
+ retvalue->reference(); //The function does not do a ref for us. //TODO: Or maybe it's a new instance. murrayc.
return retvalue;
}
@@ -391,7 +391,7 @@
#endif //GLIBMM_EXCEPTIONS_ENABLED
if(retvalue)
- retvalue->reference(); //The function does not do a ref for us.
+ retvalue->reference(); //The function does not do a ref for us. //TODO: Or maybe it's a new instance. murrayc.
return retvalue;
}
@@ -516,7 +516,7 @@
#endif //GLIBMM_EXCEPTIONS_ENABLED
if(retvalue)
- retvalue->reference(); //The function does not do a ref for us.
+ retvalue->reference(); //The function does not do a ref for us. //TODO: Or maybe it returns a new instance. It's not clear. murrayc.
return retvalue;
}
@@ -1532,8 +1532,6 @@
error = ::Glib::Error::throw_exception(gerror);
#endif //GLIBMM_EXCEPTIONS_ENABLED
- if(retvalue)
- retvalue->reference(); //The function does not do a ref for us.
return retvalue;
}
@@ -1553,8 +1551,6 @@
error = ::Glib::Error::throw_exception(gerror);
#endif //GLIBMM_EXCEPTIONS_ENABLED
- if(retvalue)
- retvalue->reference(); //The function does not do a ref for us.
return retvalue;
}
@@ -1650,8 +1646,6 @@
error = ::Glib::Error::throw_exception(gerror);
#endif //GLIBMM_EXCEPTIONS_ENABLED
- if(retvalue)
- retvalue->reference(); //The function does not do a ref for us.
return retvalue;
}
@@ -1793,8 +1787,6 @@
error = ::Glib::Error::throw_exception(gerror);
#endif //GLIBMM_EXCEPTIONS_ENABLED
- if(retvalue)
- retvalue->reference(); //The function does not do a ref for us.
return retvalue;
}
@@ -1814,8 +1806,6 @@
error = ::Glib::Error::throw_exception(gerror);
#endif //GLIBMM_EXCEPTIONS_ENABLED
- if(retvalue)
- retvalue->reference(); //The function does not do a ref for us.
return retvalue;
}
@@ -1950,8 +1940,6 @@
error = ::Glib::Error::throw_exception(gerror);
#endif //GLIBMM_EXCEPTIONS_ENABLED
- if(retvalue)
- retvalue->reference(); //The function does not do a ref for us.
return retvalue;
}
@@ -1971,8 +1959,6 @@
error = ::Glib::Error::throw_exception(gerror);
#endif //GLIBMM_EXCEPTIONS_ENABLED
- if(retvalue)
- retvalue->reference(); //The function does not do a ref for us.
return retvalue;
}
@@ -2012,7 +1998,7 @@
#endif //GLIBMM_EXCEPTIONS_ENABLED
if(retvalue)
- retvalue->reference(); //The function does not do a ref for us.
+ retvalue->reference(); //The function does not do a ref for us. //TODO: Or maybe it's a new instance. murrayc.
return retvalue;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]