Follow-up Comment #41, patch #2715 (project freeciv):

Minor comment about GdkWindow to cairo context move:
in one specific case there's a "minor" catch about it:
in case of get_overview_window, the context will leak, as each call creates a
new context.
I don't have a good idea how to go around it as refresh_overview_from_canvas
isn't client specific (and there's no release_overview_window).

Well, unless I'd simply implement get_overview_window as returning {NULL,
NULL} and forgo using refresh_overview_from_canvas in favor of doing it
correctly in the expose callback.

Cause for the time being get_overview_window is only used by
refresh_overview_from_canvas and the later only in that expose callback - but
*I* can make no guarantees about *you* starting to use it somewhere else.

    _______________________________________________________

Reply to this item at:

  <http://gna.org/patch/?2715>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to