Re: Strip HTML from string.
OK it's taken about a day and a half to track this memory leak down and it turns out the problem is not in the DLL (that was fixed 5.6 onwards I think)
The problem is the CreateVDFComProxy function in your regexp.pkg isn't global and the object that is created within it is NOT a child of cRegEx object and will be a child of a 'random' object depending on where this package file is used. So when the cRegEx object is destroyed then the proxy object may or may not be
Also because vCOMObject is always passed NULL it will always do the same thing so my fix is to remove the CreateVDFComProxy altogether and replace the construct_object/end_construct_object with this code
Code:
Procedure Construct_Object
Forward Send Construct_Object
Property String psPattern ""
Property Boolean pbIgnoreCase False
Property Handle phRegex 0
Property Boolean pbGlobalFind False
End_Procedure
Procedure End_Construct_Object
Handle hoProxy
Forward Send End_Construct_Object
Get Create u_cComRegExp to hoProxy
Send CreateComObject of hoProxy
If (IsComObjectCreated(hoProxy)) Begin
Set phRegex to hoProxy
End
End_Procedure
Success consists of going from failure to failure without loss of enthusiasm - Winston Churchill