M
Mystic Mong
Hi there,
I am relatively new to developing apps on handheld devices using the Compact
Framework and have discovered a rather annoying problem. I hope someone can
help:
I have developed an app using VS 2003 (VB.NET) utilising the Barcode Scanner
on a Symbol PDT8846 (and 8146). After each scan, the available memory goes
down by a differing number of bytes until, after about 200 scans, it runs
out of memory completely. The memory is not released until I close the app.
I have tried every way I know to dispose of the scanner and re-enable it
after each scan. Some ways use more memory than others but the result is the
same, the available memory goes down.
I have listed some of the code below for reference, but has anyone
experienced this problem or is it simply a matter of my development
in-experience.
Any help or tips would be hugely appreciated.
Cheers
Aly
Imports Symbol.Barcode
'Scanner
Dim MyReader As New Reader
Dim MyReaderData As New ReaderData(ReaderDataTypes.Text,
ReaderDataLengths.DefaultText)
Dim MyReaderHandler As New System.EventHandler(AddressOf MyReader_Notify)
'On Load Start Scanner
Private Sub frmCollectData_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
AddHandler MyReader.ReadNotify, MyReaderHandler
MyReader.Actions.Enable()
MyReader.Actions.Read(MyReaderData)
End Sub
'On scan - pass TheReaderData.Text to StockCount Procedure, then start new
read
Private Sub MyReader_Notify(ByVal o As Object, ByVal e As EventArgs)
Dim TheReaderData As ReaderData = MyReader.GetNextReaderData
lblBarcode.Text = TheReaderData.Text
StockCount(TheReaderData.Text)
MyReader.Actions.Flush()
MyReader.Actions.Read(MyReaderData)
End Sub
I am relatively new to developing apps on handheld devices using the Compact
Framework and have discovered a rather annoying problem. I hope someone can
help:
I have developed an app using VS 2003 (VB.NET) utilising the Barcode Scanner
on a Symbol PDT8846 (and 8146). After each scan, the available memory goes
down by a differing number of bytes until, after about 200 scans, it runs
out of memory completely. The memory is not released until I close the app.
I have tried every way I know to dispose of the scanner and re-enable it
after each scan. Some ways use more memory than others but the result is the
same, the available memory goes down.
I have listed some of the code below for reference, but has anyone
experienced this problem or is it simply a matter of my development
in-experience.
Any help or tips would be hugely appreciated.
Cheers
Aly
Imports Symbol.Barcode
'Scanner
Dim MyReader As New Reader
Dim MyReaderData As New ReaderData(ReaderDataTypes.Text,
ReaderDataLengths.DefaultText)
Dim MyReaderHandler As New System.EventHandler(AddressOf MyReader_Notify)
'On Load Start Scanner
Private Sub frmCollectData_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
AddHandler MyReader.ReadNotify, MyReaderHandler
MyReader.Actions.Enable()
MyReader.Actions.Read(MyReaderData)
End Sub
'On scan - pass TheReaderData.Text to StockCount Procedure, then start new
read
Private Sub MyReader_Notify(ByVal o As Object, ByVal e As EventArgs)
Dim TheReaderData As ReaderData = MyReader.GetNextReaderData
lblBarcode.Text = TheReaderData.Text
StockCount(TheReaderData.Text)
MyReader.Actions.Flush()
MyReader.Actions.Read(MyReaderData)
End Sub