﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
4028	Potential for a memory leak in _GDIPlus_BitmapCreateFromMemory	anonymous		"to fix:
in GDIPlus.au3,
in function _GDIPlus_BitmapCreateFromMemory,
replace this:
{{{#!autoit
	Local Const $hBitmap = _GDIPlus_BitmapCreateFromStream($hStream) ;creates a Bitmap object based on an IStream COM interface
	If @error Then Return SetError(3, 0, 0)
	DllCall(""oleaut32.dll"", ""long"", ""DispCallFunc"", ""ptr"", $hStream, ""ulong_ptr"", 8 * (1 + @AutoItX64), ""uint"", 4, ""ushort"", 23, ""uint"", 0, ""ptr"", 0, ""ptr"", 0, ""str"", """") ;release memory from $hStream to avoid memory leak
}}}
with this:
{{{#!autoit
	Local Const $hBitmap = _GDIPlus_BitmapCreateFromStream($hStream) ;creates a Bitmap object based on an IStream COM interface
	Local $error = @error
	DllCall(""oleaut32.dll"", ""long"", ""DispCallFunc"", ""ptr"", $hStream, ""ulong_ptr"", 2 * (@AutoItX64 ? 8 : 4), ""uint"", 4, ""ushort"", 23, ""uint"", 0, ""ptr"", 0, ""ptr"", 0, ""str"", """") ;release memory from $hStream to avoid memory leak (2 is the offset of the Release method of IUnknown in its vtable)
	If $error Then Return SetError(3, 0, 0)
}}}"	Bug	closed		AutoIt	3.3.16.1	None	Works For Me		
