activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timothy Bish (JIRA)" <j...@apache.org>
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

    [ https://issues.apache.org/activemq/browse/AMQCPP-118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_39179
] 

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.
http://www.informit.com/guides/content.asp?g=cplusplus&seqNum=40&rl=1

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: https://issues.apache.org/activemq/browse/AMQCPP-118
>             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:
> [http://www.nabble.com/Licensing-and-Porting-Issue-for-the-CMS-(ActiveMQ-CPP)-on-Visual-Studio-6-from-Visual-Studio-8-t3777279s2354.html]
> and here:
> http://blogs.msdn.com/oldnewthing/archive/2006/09/15/755966.aspx

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


Mime
View raw message