Re: Problems with un-owned objects passed to closures in pygobject (gtk_cell_renderer_text_start_editing)

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.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]