|
From: Matthew M. <mat...@gm...> - 2010-02-18 18:21:42
|
Using XP and libdmtx .NET wrapper in an attempt to decode a series of images.
Code is something like the following...
foreach (3rdParthToolImage image in 3rdPartyTool.Images)
{
byte[] data = image.Stream.Value;
MemoryStream stream = new Bitmap(data);
Bitmap bm = new Bitmap(stream);
Libdmtx.DecodeOptions opts = new Libdmtx.DecodeOptions();
opts.MaxCodes = 1;
opts.TimeoutMS = 1000;
Libdmtx.DmtxDecoded[] result = Libdmtx.Dmtx.Decode(bm, opts);
}
Receive "Attempted to read or write protected memory. This is often an
indication that other memory is corrupt" message. Happens after a
number of images have been decoded. Can anyone confirm a memory leak
in the libdmtx.net wrapper? Works like a champ on one image, fails
after about nine or ten.
|