B
Benjamin Lukner
Hi!
I had a problem for several days and now found out what it is caused by:
When calling Sub New of a class under XP, on a specific line (getting IP
address) the procedure was left immediately without raising an error.
Break Points in code lines after the "x = new y" were ignored. Stepping
through the code opens a message box on that line:
"There is not source code available for the current location."
The cause:
The program is a terminal emulation running in two versions for XP and
CE but sharing most of the code. When the connection is closed the
program restarts internally. Under CE the memory runs full because the
garbage collection doesn't clean up. So I added:
GC.Collect()
GC.GetTotalMemory(True)
GC.WaitForPendingFinalizers()
This runs perfectly under CE. But under XP it seems to dispose objects
that are created afterwards, _while_ they are created!
I solved the problem by detecting if it is a CE device and calling GC.*
only there.
Does anyone know more about this behaviour?
Kind regards,
Benjamin Lukner
I had a problem for several days and now found out what it is caused by:
When calling Sub New of a class under XP, on a specific line (getting IP
address) the procedure was left immediately without raising an error.
Break Points in code lines after the "x = new y" were ignored. Stepping
through the code opens a message box on that line:
"There is not source code available for the current location."
The cause:
The program is a terminal emulation running in two versions for XP and
CE but sharing most of the code. When the connection is closed the
program restarts internally. Under CE the memory runs full because the
garbage collection doesn't clean up. So I added:
GC.Collect()
GC.GetTotalMemory(True)
GC.WaitForPendingFinalizers()
This runs perfectly under CE. But under XP it seems to dispose objects
that are created afterwards, _while_ they are created!
I solved the problem by detecting if it is a CE device and calling GC.*
only there.
Does anyone know more about this behaviour?
Kind regards,
Benjamin Lukner