Board index » cppbuilder » Re: STL: clear list

Re: STL: clear list


2006-07-04 07:09:41 PM
cppbuilder2
Running again on the de{*word*81} i've found something interesting:
i stopped at a breakpoint on the line of the 'clear' method. Before
executing the method i've pressed ctrl+left click to inspect the methods
of the list. On window that opened i select 'methods' tab. I've found
the 'clear' method. There was a value (of pointer ?) so i pressed
left click again and it opened a new window with one tab only,
'data', and below it was written 'void'. May be this is the problem ?
Thanks
Ofer
Chris Uzdavinis (TeamB) wrote:
Quote
Ofer Gaatone < XXXX@XXXXX.COM >writes:



>>You haven't mentioned if you are using the RW or STLPort version of
>>the STL. There might be slight differences.
>>
>>
>>
>Excuse me but what is RW or STLPort ?
>
>

RogueWave or STLPort, they are different implementations of the STL.
Borland used to use RW, switched to STLPort, and most recently
switched again to Dinkumware.

I'd suggest you look for general memory corruption earlier in your
program. Perhaps a problem happens earlier in your program but
doesn't show up until here.

As for mixed libraries, I didn't mean between the client and server,
but between the executable and the dll that it is using. Or perhaps
on one machine you build with one dll, but when you deploy the
application to another machine there is a dll with the SAME NAME on
that machine but it's incompatible with the version against which the
executable was built.



 
 

Re:Re: STL: clear list

Ofer Gaatone wrote:
Quote
Bob Gonder wrote:

>Is pField guaranteed to be null terminated on entry?
>
Yes, whenever it finds the delimiter '|' it replaced by null.
Before that.
When you first get to the routine, before you change a single |,
pField must be guaranteed to be zero terminated or it would eventially
run off the end.
pField = "field|field|field|field\0"; must be zero terminated.
 

Re:Re: STL: clear list

Bob Gonder < XXXX@XXXXX.COM >writes:
Quote
When you first get to the routine, before you change a single |,
pField must be guaranteed to be zero terminated or it would eventially
run off the end.

pField = "field|field|field|field\0"; must be zero terminated.
PMFJI, but this is now doubly zero terminated.
 

{smallsort}

Re:Re: STL: clear list

Thomas Maeder [TeamB] wrote:
Quote
Bob Gonder writes:

>When you first get to the routine, before you change a single |,
>pField must be guaranteed to be zero terminated or it would eventially
>run off the end.
>
>pField = "field|field|field|field\0"; must be zero terminated.

PMFJI, but this is now doubly zero terminated.
Yeah, I was putting a point on it.