Setting Intrusive pointer to NULL

P

Pradeep

Hi,

I am working with Intrusive pointers in a DLL and I need to set the
value of the intrusive pointer to an object to NULL from inside the
method of that class.

So here's the scenario.

I have a class A which has a method del().

Now delete deletes all the data from the database and needs to set the
intrusive pointer to the object of that class to NULL so that client
cannot access anything on the pointer once the del method has been
called on it.

So can i do it in anyway.

Thanks in Advance

Regards,
Pradeep
 
J

Jim Langston

Pradeep said:
Hi,

I am working with Intrusive pointers in a DLL and I need to set the
value of the intrusive pointer to an object to NULL from inside the
method of that class.

So here's the scenario.

I have a class A which has a method del().

Now delete deletes all the data from the database and needs to set the
intrusive pointer to the object of that class to NULL so that client
cannot access anything on the pointer once the del method has been
called on it.

So can i do it in anyway.

What is an "Intrusive pointer"? I googled for "c++ intrusive pointer" and
came up with intrusive reference counting where the reference count is kept
in the object itself. Is this what you mean?

If it's just a "regular" pointer, why not simply pass a pointer to the
pointer to the call that can use del()? Although I'm not sure by your
scenario if you want this method to actually delete the instance of the
class or something else.

Can you be a little more specific?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top