activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timothy Bish (JIRA)" <>
Subject [jira] Commented: (AMQCPP-118) Provide a way to allocate and free with the same allocator
Date Wed, 30 May 2007 13:28:37 GMT


Timothy Bish commented on AMQCPP-118:

We should really think about how we do this as there are several classes that would require
a method of destroying them if we go this route, some of which don't have an nice clean place
where we can say the owner is...Session, Connection, etc

One idea I've been kicking around is to just overload the Ctor and Dtor for the classes that
are exported from the CMS api, not sure this is the best thing but if it works than the usage
would be transparent, which I'm a big fan of.  I really don't like the idea of having to make
the users remember to not just use the standard delete and instead ho find a method in some
other class that they can call to destroy an CMS object.  

Reading on overloading.

Another option would be to place static Destroy methods in each of the exported classes that
take a pointer to the object to delete.

And there's probably a lot of other ways we should consider as well.

> Provide a way to allocate and free with the same allocator
> ----------------------------------------------------------
>                 Key: AMQCPP-118
>                 URL:
>             Project: ActiveMQ C++ Client
>          Issue Type: Improvement
>            Reporter: Albert Strasheim
>            Assignee: Nathan Mittler
>             Fix For: 2.1
> Cross-runtime allocation and deallocation can cause problems on Windows (and maybe other
platforms) where you can have code linked against more than one runtime in the same program.
There should be a way to be sure that you allocate and deallocate AMQCPP objects using code
linked against the same runtime (i.e. allocate and deallocate from the same heap).
> More details in this thread:
> []
> and here:

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message