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.
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.