Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » U++ core app as DLL: memory manager problems?
U++ core app as DLL: memory manager problems? [message #23174] Wed, 23 September 2009 00:19 Go to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

I'd like to use U++ as a platform for developing complex dynamic libraries for current work project.
This dynalic library will be crossplatform (Win/POSIX) and will be attached to a number of applications written in U++ (Win, POSIX) and Delphi (Win).

Provided I export functions with POD parameters, should I expect any run-time casualities/problems with U++ memory manager?

[Updated on: Wed, 23 September 2009 00:20]

Report message to a moderator

Re: U++ core app as DLL: memory manager problems? [message #23181 is a reply to message #23174] Thu, 24 September 2009 09:51 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Mindtraveller wrote on Tue, 22 September 2009 18:19

I'd like to use U++ as a platform for developing complex dynamic libraries for current work project.
This dynalic library will be crossplatform (Win/POSIX) and will be attached to a number of applications written in U++ (Win, POSIX) and Delphi (Win).

Provided I export functions with POD parameters, should I expect any run-time casualities/problems with U++ memory manager?


As long as the interface does not expect that client code directly allocates or frees DLLs heap, everything should be OK.

In fact, at least in Win32, most DLLs I have seen (including good old OLE interfaces) are designed in a way that specifically avoid this problem.

Example: this inteface would make things go mad:

Client code:
DllX *x = DllCreateX();
....
delete x;


and this is correct:

DllX *x = DllCreateX();
....
DllDeleteX(x);


or

DllX *x = DllCreateX();
....
x->Delete();


Mirek
Previous Topic: Why ReadWithBarrier returns bool (current svn)
Next Topic: U++ program whose filename has Chinese word leaves logs after exit
Goto Forum:
  


Current Time: Wed Apr 24 14:58:56 CEST 2024

Total time taken to generate the page: 0.02372 seconds