PDA

View Full Version : tooltips and memory leaks


hartstein
March 27th, 2008, 06:44 AM
Hello, my company recently purchased the Active-x SDK. We originally prototyped it with the older 1.2 version.
I have observed 2 items with the new version

There appears to be a large memory leak (about 64K) each time the active-x control is used. The following vb6 program demonstrates the problem.

Private Sub Form_Load()
For i = 1 To 1000
Set ctl = Controls.Add("Foxit.FoxitReaderSDKctrl.2", "SDK", Form1)
ctl.Move 1, 1, Form1.Width, Form1.Height
ctl.OpenFile "c:\trash\t.pdf", ""
ctl.Visible = True
Controls.Remove ctl
Set ctl = Nothing
MsgBox "pause"
Next
End Sub

2) The tooltip text has appeared to disappear from the controls. I don't even see these strings in the resource file for the active-x control as all.

jinming_wang
March 30th, 2008, 11:05 PM
You should call function CloseFile after calling OpenFile. in this way ,you may reduce the size of memory leak.However there do exist the memory leak when ActiveX open a PDF document. About the tooltip text, it should be a bug of ActiveX 2.0.

AmyLin
September 24th, 2008, 11:12 PM
This issue have been fixed in ActiveX 2.3