From f811bc9ac07404a8e90570b243918d11289ef1e2 Mon Sep 17 00:00:00 2001
From: Mattia Barbon <mbarbon@cpan.org>
Date: Sat, 6 Jul 2002 21:16:35 +0000
Subject: [PATCH] Made documentation for wxImage::GetData/SetData more explicit
 about the fact that wxImage owns the pointer.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16069 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 docs/latex/wx/image.tex | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/docs/latex/wx/image.tex b/docs/latex/wx/image.tex
index 56fed27525..4986bf1c19 100644
--- a/docs/latex/wx/image.tex
+++ b/docs/latex/wx/image.tex
@@ -351,6 +351,9 @@ Returns the image data as an array. This is most often used when doing
 direct image manipulation. The return value points to an array of
 characters in RGBRGBRGB$\ldots$ format.
 
+You should not delete the returned pointer nor pass it to
+\helpref{wxImage::SetData}{wximagesetdata}.
+
 \membersection{wxImage::GetGreen}\label{wximagegetgreen}
 
 \constfunc{unsigned char}{GetGreen}{\param{int}{ x}, \param{int}{ y}}
@@ -810,6 +813,13 @@ Sets the image data without performing checks. The data given must have
 the size (width*height*3) or results will be unexpected. Don't use this
 method if you aren't sure you know what you are doing.
 
+The data must have been allocated with malloc(), NOT with operator new.
+
+After this call the pointer to the data is owned by the wxImage object,
+that will be responsible for deleting it.
+Do not pass to this function a pointer obtained through
+\helpref{wxImage::GetData}{wximagegetdata}.
+
 \membersection{wxImage::SetMask}\label{wximagesetmask}
 
 \func{void}{SetMask}{\param{bool}{ hasMask = TRUE}}
-- 
2.50.0

