mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
Fixed some memory leaks in taskmgr. Patch by Christoph_vW <Christoph@ApiViewer.de>
svn path=/trunk/; revision=18133
This commit is contained in:
parent
5d41a8d313
commit
afb1aa2562
3 changed files with 13 additions and 10 deletions
|
@ -99,20 +99,18 @@ static void GraphCtrl_Init(TGraphCtrl* this)
|
||||||
this->m_bitmapOldPlot = NULL;
|
this->m_bitmapOldPlot = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
void GraphCtrl_Dispose(TGraphCtrl* this)
|
||||||
TGraphCtrl::~TGraphCtrl()
|
|
||||||
{
|
{
|
||||||
/* just to be picky restore the bitmaps for the two memory dc's */
|
/* just to be picky restore the bitmaps for the two memory dc's */
|
||||||
/* (these dc's are being destroyed so there shouldn't be any leaks) */
|
/* (these dc's are being destroyed so there shouldn't be any leaks) */
|
||||||
if (m_bitmapOldGrid != NULL) SelectObject(m_dcGrid, m_bitmapOldGrid);
|
if (this->m_bitmapOldGrid != NULL) SelectObject(this->m_dcGrid, this->m_bitmapOldGrid);
|
||||||
if (m_bitmapOldPlot != NULL) SelectObject(m_dcPlot, m_bitmapOldPlot);
|
if (this->m_bitmapOldPlot != NULL) SelectObject(this->m_dcPlot, this->m_bitmapOldPlot);
|
||||||
if (m_bitmapGrid != NULL) DeleteObject(m_bitmapGrid);
|
if (this->m_bitmapGrid != NULL) DeleteObject(this->m_bitmapGrid);
|
||||||
if (m_bitmapPlot != NULL) DeleteObject(m_bitmapPlot);
|
if (this->m_bitmapPlot != NULL) DeleteObject(this->m_bitmapPlot);
|
||||||
if (m_dcGrid != NULL) DeleteDC(m_dcGrid);
|
if (this->m_dcGrid != NULL) DeleteDC(this->m_dcGrid);
|
||||||
if (m_dcPlot != NULL) DeleteDC(m_dcPlot);
|
if (this->m_dcPlot != NULL) DeleteDC(this->m_dcPlot);
|
||||||
if (m_brushBack != NULL) DeleteObject(m_brushBack);
|
if (this->m_brushBack != NULL) DeleteObject(this->m_brushBack);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
BOOL GraphCtrl_Create(TGraphCtrl* this, HWND hWnd, HWND hParentWnd, UINT nID)
|
BOOL GraphCtrl_Create(TGraphCtrl* this, HWND hWnd, HWND hParentWnd, UINT nID)
|
||||||
{
|
{
|
||||||
|
|
|
@ -91,6 +91,7 @@ double GraphCtrl_AppendPoint(TGraphCtrl* this,
|
||||||
double dNewPoint2, double dNewPoint3);
|
double dNewPoint2, double dNewPoint3);
|
||||||
BOOL GraphCtrl_Create(TGraphCtrl* this, HWND hWnd, HWND hParentWnd,
|
BOOL GraphCtrl_Create(TGraphCtrl* this, HWND hWnd, HWND hParentWnd,
|
||||||
UINT nID);
|
UINT nID);
|
||||||
|
void GraphCtrl_Dispose(TGraphCtrl* this);
|
||||||
void GraphCtrl_DrawPoint(TGraphCtrl* this);
|
void GraphCtrl_DrawPoint(TGraphCtrl* this);
|
||||||
void GraphCtrl_InvalidateCtrl(TGraphCtrl* this);
|
void GraphCtrl_InvalidateCtrl(TGraphCtrl* this);
|
||||||
void GraphCtrl_Paint(TGraphCtrl* this, HWND hWnd, HDC dc);
|
void GraphCtrl_Paint(TGraphCtrl* this, HWND hWnd, HDC dc);
|
||||||
|
|
|
@ -115,6 +115,10 @@ PerformancePageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
/* PAINTSTRUCT ps; */
|
/* PAINTSTRUCT ps; */
|
||||||
|
|
||||||
switch (message) {
|
switch (message) {
|
||||||
|
case WM_DESTROY:
|
||||||
|
GraphCtrl_Dispose(&PerformancePageCpuUsageHistoryGraph);
|
||||||
|
GraphCtrl_Dispose(&PerformancePageMemUsageHistoryGraph);
|
||||||
|
|
||||||
case WM_INITDIALOG:
|
case WM_INITDIALOG:
|
||||||
|
|
||||||
/* Save the width and height */
|
/* Save the width and height */
|
||||||
|
|
Loading…
Reference in a new issue