Message 1 of 2
Returning objects allocated within DBX
Not applicable
11-13-2002
12:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a custom entity defined in a DBX. One of its methods has an argument
of std::string&, which is filled in within the function. I can call it from
my ARX, and the variable has the proper value. However, when the variable
goes out of scope, I get an exception in the destructor. I'm pretty sure
this is due to a different operator new being used within my custom entity
class. I know I could figure a way around this simple example, but in
general I may want to have a method on my custom entity that returns some
complex STL structure. Is there a straightforward way to force these objects
to be allocated using the "normal" new, so I don't run into problems when
they are destryed in the ARX?
of std::string&, which is filled in within the function. I can call it from
my ARX, and the variable has the proper value. However, when the variable
goes out of scope, I get an exception in the destructor. I'm pretty sure
this is due to a different operator new being used within my custom entity
class. I know I could figure a way around this simple example, but in
general I may want to have a method on my custom entity that returns some
complex STL structure. Is there a straightforward way to force these objects
to be allocated using the "normal" new, so I don't run into problems when
they are destryed in the ARX?