From 4e690da6eb1a29d392b7338d75f9e51ddc864bd7 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Mon, 21 May 2007 08:27:01 +0000 Subject: [PATCH] added comments on why no CFRelease is used git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@46137 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/dataobj.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mac/carbon/dataobj.cpp b/src/mac/carbon/dataobj.cpp index d5c43525a3..ba88d93333 100644 --- a/src/mac/carbon/dataobj.cpp +++ b/src/mac/carbon/dataobj.cpp @@ -277,6 +277,8 @@ void wxDataObject::AddToPasteboard( void * pb, int itemID ) CFRelease(url); PasteboardPutItemFlavor( pasteboard, (PasteboardItemID) counter, (CFStringRef) thisFormat.GetFormatId() , data, kPasteboardFlavorNoFlags); + // don't release do CFRelease( data ), it's not documented but the samples don't release the data for non promised entries + // also when running with the _debug version of carbon drag and drop is showing errors otherwise counter++; fname = strtok (NULL,"\n"); } @@ -291,6 +293,8 @@ void wxDataObject::AddToPasteboard( void * pb, int itemID ) else PasteboardPutItemFlavor( pasteboard, (PasteboardItemID) itemID, (CFStringRef) thisFormat.GetFormatId() , data, kPasteboardFlavorNoFlags); + // don't release do CFRelease( data ), it's not documented but the samples don't release the data for non promised entries + // also when running with the _debug version of carbon drag and drop is showing errors otherwise } free( buf ); }