Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

char* TStrings::GetText() - keeps EAccessViolation-ing

Status
Not open for further replies.

biot023

Programmer
Nov 8, 2001
403
GB
Hallo.
I have a line of code that keeps throwing an error.
The line is:
char* dir=FTP->PWD(listServerDir->Items[listServerDir->ItemIndex].GetText());
(which I think should be followed by)
StrDispose(dir);

Can anyone tell me where I'm going wrong here?
As I understand it, the char* from GetText() should still be valid, as the caller (according to the help files) has to de-allocate the string with StrDispose(char*).

So why my error?

All help gratefully appreciated.

Cheers,
Douglas JL

If it don't make you laugh, it ain't true.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top