Re: "reversible"
- From: Behdad Esfahbod <behdad behdad org>
- To: Ryan Lortie <desrt desrt ca>
- Cc: gtk-devel-list gnome org
- Subject: Re: "reversible"
- Date: Fri, 28 Sep 2012 11:38:59 -0400
On 09/27/2012 04:01 PM, Ryan Lortie wrote:
> Would this API make your life easier? Could it be better?
There are other uses I see for this API:
- It can be used to register release functions to be called at shutdown time,
- It can be used as a "cleanup stack" [1],
At any rate, what I don't like about the proposed API is that the reversible
is implicit. That would be cause for endless confusion. I'd rather see
reversible objects being passed around like GError and GCancelable. Perhaps
GCancelable can be reused indeed. You can just add a method to GCancelable
that adds a "release" function to be called if the cancelable is ever canceled.
b
[1] http://www.freetype.org/david/reliable-c.html
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]