From 91522894c10a4a469a7b235e4f2697b46d0cb60d Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sun, 19 Apr 2015 22:10:11 -0400 Subject: [PATCH] More stuff in lifetimes.md. --- docs/lifetimes.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/lifetimes.md b/docs/lifetimes.md index f1d94aac..4546b782 100644 --- a/docs/lifetimes.md +++ b/docs/lifetimes.md @@ -32,7 +32,7 @@ Note that control implementations generally don't need to worry about backend-sp Windows has no reference counting for window handles. The only situations where a window handle can be destroyed are - with a call to `DestroyWindow()`, or -- by `DefWindowProc()` if it receives a `WM_CLOSE` message +- by `DefWindowProc()` if it receives a `WM_CLOSE` message (when the user clicks the Close button on the titlebar of a toplevel window, for instance) The destruction process is simple: @@ -53,6 +53,8 @@ What does this mean? In the normal case, you create a widget, add it to a contai Note that removing a widget from a container does not call `gtk_widget_destroy()`; it merely decrements the reference count of the widget. +As with Windows, a `::delete-event` signal (which is sent when the user clicks a toplevel window's Close button) that is allowed to propagate will result in the window being destroyed. + TODO describe what we need to do TODO remove lifetimes.c?