|
It is currently Tue Feb 07, 2012 8:39 pm
|
View unanswered posts | View active topics
| Welcome |
|
Welcome to RHAPSODY4YOU
You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, respond to polls, upload and download content, and access many other special features. Registration is fast, simple, and absolutely free, so please, register to join our community today. |
 |
|
 |
|
| Author |
Message |
|
oakdemir
|
Post subject: support for static architecture Posted: Thu Jul 01, 2010 12:36 pm |
Joined: Tue Jun 24, 2008 6:18 pm Posts: 141 Location: Ankara
|
|
Hi all,
I know that setting CPP_CG::Class::BaseNumberOfInstance, one can statically allocate the local heap for the relevant object and/or event.
What I understand is that setting BaseNumberOfInstances to N; N object will be instantiated within the pool.
If my understanding is correct, questions come next :
- instantiation means constructor call.. so which constructor will be used if the object has more than one ? - deleting the object will mark the object's slot in the pool as "unused" (to let it to be used later) ( is this true ? ) , but will the destructor be called in that case ? If it is called, destructing any instance of A ( please look at below), actually making it available to the pool, will delete the space allocated by pList, resulting in invalid pointer for the next usage...However , if the destructor is not called, then the object in the pool have some values inside remaining from the previous usage..
How does OXF handle pool management for such statically allocated objects ?
Thanks from now on.
Özgür Eser Akdemir
class A
int* pList;
A() { pList = new int[DEFAULT_SIZE]; }
A(int size) { pList = new int[size]; }
~A() { delete pList; }
};
|
|
|
|
 |
|
oakdemir
|
Post subject: Re: support for static architecture Posted: Wed Jul 21, 2010 9:31 pm |
Joined: Tue Jun 24, 2008 6:18 pm Posts: 141 Location: Ankara
|
|
|
|
 |
|
|
 |
|
 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|