Power CDG Control Still Has A Memory Leak Problem
Posted: Tue Apr 24, 2007 9:28 am
I am trying out the Power CDG Control. I am using Visual Studio 2005 on a WinXP system, and programming in Visual Basic .NET.
Each time a new file is loaded using the LoadFile method, more memory is used, and the memory used by the previous file is not released.
This behavior even occurs with the included sample VB project.
I thought I could get around this by instantiating a new AxPowerPlayCDG for each new file played, but that did not solve the problem.
Here are my subroutines for creating and disposing the control:
Private Sub InitializeCDG()
MyCDG1 = New AxPowerPlayCDGLib.AxPowerPlayCDG
MyCDG1.Name = "MyCDG1"
MyCDG1.Location = New System.Drawing.Point(12, 12)
MyCDG1.Size = New System.Drawing.Size(343, 258)
Controls.Add(MyCDG1)
MyCDG1.Enabled = True
End Sub
Private Sub RemoveCDG()
Controls.Remove(MyCDG1)
MyCDG1.Dispose()
MyCDG1 = Nothing
End Sub
Basically, each time I want to play a CDG, I call the InitializeCDG routine to create a new control. Then, when I am done playing the CDG file, I call the RemoveCDG routine. I thought that the RemoveCDG routine would free up all the memory used by the control, but it doesn't.
I saw the previous thread (in 2005) regarding this problem, but there was no resolution. I am using the unregistered version, so any tests of this behavior should also use the unregistered version. In the previous thread, it wasn't clear what versions people were using.
Each time a new file is loaded using the LoadFile method, more memory is used, and the memory used by the previous file is not released.
This behavior even occurs with the included sample VB project.
I thought I could get around this by instantiating a new AxPowerPlayCDG for each new file played, but that did not solve the problem.
Here are my subroutines for creating and disposing the control:
Private Sub InitializeCDG()
MyCDG1 = New AxPowerPlayCDGLib.AxPowerPlayCDG
MyCDG1.Name = "MyCDG1"
MyCDG1.Location = New System.Drawing.Point(12, 12)
MyCDG1.Size = New System.Drawing.Size(343, 258)
Controls.Add(MyCDG1)
MyCDG1.Enabled = True
End Sub
Private Sub RemoveCDG()
Controls.Remove(MyCDG1)
MyCDG1.Dispose()
MyCDG1 = Nothing
End Sub
Basically, each time I want to play a CDG, I call the InitializeCDG routine to create a new control. Then, when I am done playing the CDG file, I call the RemoveCDG routine. I thought that the RemoveCDG routine would free up all the memory used by the control, but it doesn't.
I saw the previous thread (in 2005) regarding this problem, but there was no resolution. I am using the unregistered version, so any tests of this behavior should also use the unregistered version. In the previous thread, it wasn't clear what versions people were using.