Re: Problems with un-owned objects passed to closures in pygobject (gtk_cell_renderer_text_start_editing)
- From: David NeÄas <yeti physics muni cz>
- To: Tristan Van Berkom <tvb gnome org>
- Cc: gtk-devel-list gnome org
- Subject: Re: Problems with un-owned objects passed to closures in pygobject (gtk_cell_renderer_text_start_editing)
- Date: Mon, 4 Feb 2013 09:01:29 +0100
On Mon, Feb 04, 2013 at 04:44:02PM +0900, Tristan Van Berkom wrote:
> On Mon, Feb 4, 2013 at 11:39 AM, Simon Feltman <s feltman gmail com> wrote:
> [...]
> > However, it also adds a leak for the most basic (and useless) case:
> > for i in range(10):
> > Gtk.Button()
>
> This could arguably trigger a compiler warning, or even an error.
This is nonsense. Since Gtk.Button() is not guaranteed *not* to have
any side effects it is perfectly valid to run it without doing anything
with the return value.
In fact, since we talk about a dynamic language, the interpreter does
not know, in general, what Gtk.Button will mean at the time the code is
actually executed.
Yeti
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]