This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: Call dynamic pointer
- From: Larry Hall <cygwin-lh at cygwin dot com>
- To: Lucien Mathieu <lucien dot mathieu at skynet dot be>
- Cc: cygwin at cygwin dot com
- Date: Mon, 21 Jul 2003 10:37:06 -0400
- Subject: Re: Call dynamic pointer
- References: <001401c34f79$402576a0$837588d9@arthas>
- Reply-to: cygwin at cygwin dot com
Lucien Mathieu wrote:
Hello,
in a dll, I'm calling a
extern "C" {
void * init();
}
where it is define as follow
void * init() {
return (new TObject());
}
it's doing a segment fault,
does the new pointer is automatically deleted?
I was thinking not to use the dlclose in the main program,
but it doesn't work either.
Any idea how to return a pointer from a DLL to a main program?
Is this issue Cygwin specific? If so, please provide details of the
problem if you'd like someone here to be able to help solve it.
Otherwise, you might want to make a similar inquiry to a Windows C++
development forum. I'd suggest including sample code that reproduces
the problem too.
--
Larry Hall http://www.rfk.com
RFK Partners, Inc. (508) 893-9779 - RFK Office
838 Washington Street (508) 893-9889 - FAX
Holliston, MA 01746
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/