This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
fopen/fclose
- From: "Jurica Baricevic" <jura at INTESIS dot hr>
- To: "Ecos" <ecos-discuss at sources dot redhat dot com>
- Date: Fri, 22 Mar 2002 17:01:07 +0100
- Subject: [ECOS] fopen/fclose
Hi!
I have a quite simple question regarding memory allocation/deallocation in
fopen/fclose :-)
It seems that fopen() creates stream with new operator (fopen.cxx:133):
stream = new Cyg_StdioStream(....);
while its pair fclose() destroys it with the following combination
(fclose.cxx:101):
stream->~Cyg_StdioStream();
free(stream);
I wonder what could be the reason for not using delete operator in fclose()
instead?
Thanks,
Jura
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss