From: Julian Smart Date: Sun, 7 Apr 2002 21:12:45 +0000 (+0000) Subject: Removed leaks from Forty demo X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/15bee36fdf12ec78f61e1372a460a7606f7ccb7e Removed leaks from Forty demo Added VC++ project file for artprov sample Updated file lists git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15004 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/demos/forty/canvas.cpp b/demos/forty/canvas.cpp index ef3ae68b82..81e7985234 100644 --- a/demos/forty/canvas.cpp +++ b/demos/forty/canvas.cpp @@ -68,6 +68,8 @@ FortyCanvas::~FortyCanvas() UpdateScores(); delete m_game; delete m_scoreFile; + delete m_handCursor; + delete m_arrowCursor; } diff --git a/demos/forty/card.h b/demos/forty/card.h index cc525a741b..aab8df9d71 100644 --- a/demos/forty/card.h +++ b/demos/forty/card.h @@ -33,13 +33,14 @@ enum Suit { clubs = 0, diamonds = 1, hearts = 2, spades = 3 }; enum SuitColour { red = 0, black = 1 }; enum WayUp { faceup, facedown }; - //--------------------------------// // A class defining a single card // //--------------------------------// class Card { - static double m_scale; - static int m_width,m_height; + friend class FortyApp; + + static double m_scale; + static int m_width,m_height; public: Card(int value, WayUp way_up = facedown); diff --git a/demos/forty/forty.cpp b/demos/forty/forty.cpp index fbf0f1c546..43865d8840 100644 --- a/demos/forty/forty.cpp +++ b/demos/forty/forty.cpp @@ -52,6 +52,20 @@ wxColour* FortyApp::m_backgroundColour = 0; wxColour* FortyApp::m_textColour = 0; wxBrush* FortyApp::m_backgroundBrush = 0; +FortyApp::FortyApp() +{ +} + +FortyApp::~FortyApp() +{ + delete m_backgroundColour; + delete m_textColour; + delete m_backgroundBrush; + delete Card::m_symbolBmap; + delete Card::m_pictureBmap; + +} + bool FortyApp::OnInit() { bool largecards = FALSE; diff --git a/demos/forty/forty.h b/demos/forty/forty.h index f3f36baee8..d6d9e3f752 100644 --- a/demos/forty/forty.h +++ b/demos/forty/forty.h @@ -16,6 +16,8 @@ class FortyApp: public wxApp { public: + FortyApp(); + ~FortyApp(); bool OnInit(); static const wxColour& BackgroundColour(); diff --git a/distrib/msw/makefile.rsp b/distrib/msw/makefile.rsp index ba5a30903d..c8e87e849c 100644 --- a/distrib/msw/makefile.rsp +++ b/distrib/msw/makefile.rsp @@ -2,6 +2,7 @@ Makefile.in src/regex/Makefile.in locale/Makefile samples/Makefile.in +samples/artprov/Makefile.in samples/calendar/Makefile.in samples/caret/Makefile.in samples/checklst/Makefile.in diff --git a/distrib/msw/vc.rsp b/distrib/msw/vc.rsp index 1b7ca135c6..c4f9642b19 100644 --- a/distrib/msw/vc.rsp +++ b/distrib/msw/vc.rsp @@ -22,6 +22,9 @@ src/regex/regex.dsw samples/samples.dsw +samples/calendar/arttest.dsp +samples/calendar/arttest.dsw + samples/calendar/calendar.dsp samples/calendar/calendar.dsw diff --git a/samples/artprov/arttest.dsp b/samples/artprov/arttest.dsp new file mode 100644 index 0000000000..c776958931 --- /dev/null +++ b/samples/artprov/arttest.dsp @@ -0,0 +1,158 @@ +# Microsoft Developer Studio Project File - Name="arttest" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=arttest - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "arttest.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "arttest.mak" CFG="arttest - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "arttest - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE "arttest - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "arttest - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "arttest - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!ELSEIF "$(CFG)" == "arttest - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDll" +# PROP BASE Intermediate_Dir "ReleaseDll" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDll" +# PROP Intermediate_Dir "ReleaseDll" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W4 /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /YX /FD /c +# ADD CPP /nologo /W4 /O2 /I "../../include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D WIN32 /D WINVER=0x400 /D _MT /D wxUSE_GUI=1 /YX /FD /c /MD /D WXUSINGDLL /I..\..\lib\mswdll +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /I "../../include" +# ADD RSC /l 0x409 /d "NDEBUG" /I "../../include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /machine:I386 ..\..\lib\wxmsw233.lib + +!ELSEIF "$(CFG)" == "arttest - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDll" +# PROP BASE Intermediate_Dir "DebugDll" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDll" +# PROP Intermediate_Dir "DebugDll" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W4 /Zi /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /YX /FD /c +# ADD CPP /nologo /W4 /Zi /Od /I "../../include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D WIN32 /D WINVER=0x400 /D _MT /D wxUSE_GUI=1 /YX /FD /c /MDd /D "__WXDEBUG__" /D "WXDEBUG=1" /D WXUSINGDLL /I..\..\lib\mswdlld +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /I "../../include" +# ADD RSC /l 0x409 /d "_DEBUG" /I "../../include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept ..\..\lib\wxmsw233d.lib + +!ELSEIF "$(CFG)" == "arttest - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W4 /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /YX /FD /c +# ADD CPP /nologo /W4 /O2 /I "../../include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D WIN32 /D WINVER=0x400 /D _MT /D wxUSE_GUI=1 /YX /FD /c /MD /I..\..\lib\msw +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" /I "../../include" +# ADD RSC /l 0x409 /d "NDEBUG" /I "../../include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /machine:I386 ..\..\lib\zlib.lib ..\..\lib\regex.lib ..\..\lib\png.lib ..\..\lib\jpeg.lib ..\..\lib\tiff.lib ..\..\lib\wxmsw.lib + +!ELSEIF "$(CFG)" == "arttest - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W4 /Zi /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /YX /FD /c +# ADD CPP /nologo /W4 /Zi /Od /I "../../include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D WIN32 /D WINVER=0x400 /D _MT /D wxUSE_GUI=1 /YX /FD /c /MDd /D "__WXDEBUG__" /D "WXDEBUG=1" /I..\..\lib\mswd +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" /I "../../include" +# ADD RSC /l 0x409 /d "_DEBUG" /I "../../include" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept ..\..\lib\zlibd.lib ..\..\lib\regexd.lib ..\..\lib\pngd.lib ..\..\lib\jpegd.lib ..\..\lib\tiffd.lib ..\..\lib\wxmswd.lib + +!ENDIF + +# Begin Target + +# Name "arttest - Win32 Release DLL" +# Name "arttest - Win32 Debug DLL" +# Name "arttest - Win32 Release" +# Name "arttest - Win32 Debug" +# Begin Source File + +SOURCE=.\arttest.cpp +# End Source File +# Begin Source File + +SOURCE=.\artbrows.cpp +# End Source File +# Begin Source File + +SOURCE=.\arttest.rc +# End Source File +# End Target +# End Project diff --git a/samples/minimal/minimal.cpp b/samples/minimal/minimal.cpp index 29c30397a5..29ea39bf0d 100644 --- a/samples/minimal/minimal.cpp +++ b/samples/minimal/minimal.cpp @@ -182,7 +182,7 @@ void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) { wxString msg; - msg.Printf( _T("This is the about dialog of minimal sample.\n") + msg.Printf( _T("This is the About dialog of the minimal sample.\n") _T("Welcome to %s"), wxVERSION_STRING); wxMessageBox(msg, _T("About Minimal"), wxOK | wxICON_INFORMATION, this);