S
Sreeram
Hello,
I am having a doubt about smart pointer. I wrote a smart ptr class
with limited functionalities. I want to do like this!
CSmartPtr <CSomeClass> test = new CSomeClass;
// here i need to call a function which will start a thread and
returns once it starts the thread. Here i should able to increment the
refcount of smart pointer and should decrement once the thread
finishes executing. What i
should do here? Can anybody please advice me?
The code will looks like this.
while (bDone) // loop forever
{
// do some process here.
if (accepted)
{
CSmartPtr <CSomeClass> test = new CSomeClass;
// call the thread starter function of the "CSomeClass".
}
}
Thanks,
Sreeram
Note: Please send a copy of the answer to (e-mail address removed).
Because i can acess this newsgroup only through google which will post
the answer after 8 or 10hours. Thanks!
I am having a doubt about smart pointer. I wrote a smart ptr class
with limited functionalities. I want to do like this!
CSmartPtr <CSomeClass> test = new CSomeClass;
// here i need to call a function which will start a thread and
returns once it starts the thread. Here i should able to increment the
refcount of smart pointer and should decrement once the thread
finishes executing. What i
should do here? Can anybody please advice me?
The code will looks like this.
while (bDone) // loop forever
{
// do some process here.
if (accepted)
{
CSmartPtr <CSomeClass> test = new CSomeClass;
// call the thread starter function of the "CSomeClass".
}
}
Thanks,
Sreeram
Note: Please send a copy of the answer to (e-mail address removed).
Because i can acess this newsgroup only through google which will post
the answer after 8 or 10hours. Thanks!