Click to search the site Click to log in
Online articles
Download free tools
Support pages, per product
Services
Frequently asked questions, per product
ListControl Leaks Memory
Author: George Mihaescu
Published: February 1, 2003
Category: Bug / Win32
Notes: This article is obsolete
Description: This article describes a memory leak in the Windows common ListControl in Report mode.
View count: 1,814
Comments: 1 Read comments or post your own

  Print viewOpens in new window
 ListControl Leaks Memory

ListControl Leaks Memory

 

By George Mihaescu

 

This article is obsolete; the described behavior refers to an old version of COMCTL32.DLL (implementation of Windows Common Controls) installed by IE 4 and the problem was fixed in subsequent versions of this DLL.

The code demonstrating the problem was removed because we could not reproduce this problem anymore; this article will be removed soon.

 

Summary: The Win32 List Control leaks memory in report mode, when columns are deleted. If adding then deleting column the memory used internally by the control to store that column’s name is not freed, resulting in a leak of a block with a byte size equal to the length of the column name.

Therefore, if in a list control the columns are added and deleted repeatedly this will lead to a memory leak.

 

This behavior has been observed in Win32 on WinNT Service pack 3, using MFC, but the problem was tracked down into the actual Windows control.

 


Reader comments:
Name: (optional)
Verification text:    
(type as in image next to it)
Comment: max 2,000 characters; for security reasons no active content / no HTML formatting is supported.
Please stick to the subject of the article; comments are reviewed and unrelated / inappropriate ones will be deleted.

On Apr 18, 2007 at 22:38 EST Anonymous said:

*** The comment was removed due to unrelated or inappropriate content. ***
Copyright 2308 registered users, 24 users online now