WordPerfect to LaTeX converter News
Brought to you by:
fojtik
This is the cause:
https://www.ibm.com/docs/vi/xcfbg/121.141?topic=functions-sync-fetch-sub
The function returns the initial value of the variable that __p points to.
https://learn.microsoft.com/en-us/windows/win32/api/winnt/nf-winnt-interlockeddecrement
The function returns the resulting decremented value.
:(
Different return value causes that on Windows no leak occurs, but on all unix systems
decreasing ussage counter does not cause releasing memory.
~~~
if(I->Raster!=NULL)
{
if(InterlockedDecrement(&I->Raster->UsageCount)<=0)
delete I->Raster;
I->Raster = NULL;
}
~~~
This will be fixed in WP2LaTeX-4.14