This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Call dynamic pointer


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?

Thanks in advance,
Lucien.



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]