From aa6a8fbdf0983f48065a4feb15330c210b34ac0f Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 6 Dec 2018 03:43:37 +0100 Subject: [PATCH] Document that wxGCDC takes ownership of the provided context This is a rather important detail which the documentation completely forgot to mention. --- interface/wx/dcgraph.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/interface/wx/dcgraph.h b/interface/wx/dcgraph.h index c60a00e7e0..ed2d01a9c1 100644 --- a/interface/wx/dcgraph.h +++ b/interface/wx/dcgraph.h @@ -40,6 +40,10 @@ public: /** Construct a wxGCDC from an existing graphics context. + + Note that this object takes ownership of @a context and will delete it + when it is destroyed or when SetGraphicsContext() is called with a + different context object. */ wxGCDC(wxGraphicsContext* context); @@ -64,8 +68,11 @@ public: /** Set the graphics context to be used for this wxGCDC. + + Note that this object takes ownership of @a context and will delete it when + it is destroyed or when SetGraphicsContext() is called again. */ - void SetGraphicsContext( wxGraphicsContext* ctx ); + void SetGraphicsContext(wxGraphicsContext* context); };