Re: SerialPort Class

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hi,
Does your application stop or hangs?
I've experienced sudden stops (no exceptions) due to a memory leak.
I'd look for memory that is not being released somewhere.

Germán.

On 8 abr, 17:13, Aidan <Ai...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Hello,

We are experiencing a strange problem. We have a thread that transmits and
receives ASCII from a remote device.

The basic flow is before transmitting we call DiscardInBuffer() and
DiscardOutBuffer(), we use the Write() method to send each character in a
buffer. The thread then checks the BytesToRead member and calls the Read()
method until a 'special character is received or a timeout elapses.

This process is repeated very 20 seconds. After a couple of days we get a
timeout whilst receiving...which could be due to the remote
device...granted...the strange thing is that after then calling the
Discard..() members the thread calls the Write() function and never returns
after the first call....an exception is not returned either....

Does anyone know if there are any issues with longterm operation of the
SerialPort class in CF 2.0 ?

Thanks in advance,

Aidan Browne

.



Relevant Pages

  • RE: Can this cause memory leak ?
    ... No memory leak to worry about. ... it is inefficient and bad practice to catch exceptions ... during the normal flow of your code. ... > But I worry there is memory leak for lack the Deletecall. ...
    (microsoft.public.vc.language)
  • App issues with CE 5.0
    ... released and a memory leak results. ... creating but not destroying threads. ... that resulted in exceptions and these exceptions were traced to ATL. ... replaced the ATL SDK and atlce400.dll files with those from CE 4.0 and ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Allocatable Components of Derived Type
    ... One exception I guess is an allocatable array declared in a subroutine ... There are *NO* exceptions. ... Such a case will not cause a memory leak, ... If you try to allocate the array again without ...
    (comp.lang.fortran)
  • Re: malloc and realloc
    ... Exceptions exist. ... So there's a memory leak for some tiny number of clock cycles until ... even Windows 95 occasionally suffered from this deficiency. ...
    (comp.lang.c)