Boost logo

Boost :

From: E. Gladyshev (egladysh_at_[hidden])
Date: 2002-03-26 16:52:03


> I don't see how you could solve the problem in
> general. You insist on a C
> interface to guarantee interoperability between
> different compilers or
> languages, while at the same time trying to
> deallocate memory in the DLL
> that the EXE has allocated.

I think we've gone too far with
the interoperability between different languages.
The whole discussion about DLL was to show
that C interface does make
sense in real life development and
it is used a lot in huge multi-team projects.
I think we all agreed on this one.

However the generic solution that I am looking for
is not so generic to be multi-language.

The idea is to have a global smart pointer
implementation for example in a static library
like STL. The static library will be used
by all the modules in the project internally
but the module interfaces will be C.

> Obviously, compiler A
> cannot 'delete' memory
> 'new'ed by compiler B, even if they are both C++
> compilers.
>

Why not? you can always overload new and delete
and put them in the global static library to
be used by all modules. The custom new/delete
will mantain a global heap for all clients.
This way all compilers will call the same
memory management routines.

What is wrong with that?

__________________________________________________
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®
http://movies.yahoo.com/


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk