473,322 Members | 1,405 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Setting Intrusive pointer to NULL

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

Oct 19 '05 #1
1 1601
"Pradeep" <pr***********@gmail.com> wrote in message
news:11*********************@z14g2000cwz.googlegro ups.com...
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?
Oct 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Marcin Kalicinski | last post by:
Hi everybody, I am creating an intrusive list ('next' and 'prev' pointers are stored within an object that is in a list). One method of doing that is to inherit all objects from some class that...
2
by: Alan Brown | last post by:
Subject: Setting Pointer to Video memory Newsgroups: Optus:comp.lang.c++.moderated Hi People, I am trying to create a Help Screen in a program. I want to swap out the video memory, use...
110
by: Mr A | last post by:
Hi! I've been thinking about passing parameteras using references instead of pointers in order to emphasize that the parameter must be an object. Exemple: void func(Objec& object); //object...
6
by: Pradeep | last post by:
Hi, I am using intrusive pointers for my code but i am not much aquianted with them. I am using an example to illustrate my problem as i can't share the code. I have two clases ( say A and B)...
2
by: Ven | last post by:
If an Object is holding a valid reference to an Object, should I set it to Nothing before I set it to a another Object of the same type? ex: Dim objNode Set objNode=Node1 ' Say node1 is some...
12
by: Joe | last post by:
I might be overworked so please excuse this stupid question... Say I do the following: DataTable table = new DataTable(); myDataAdaptor.Fill(table); dataGrid1.DataSource = table;
5
by: Amogh | last post by:
Hi, My question is related to setting freed pointers to NULL. After freeing a pointer: 1) Should the freeing routine also be responsible for setting the pointer to null? 2) Or, should the...
2
by: Steven T. Hatton | last post by:
It's my understanding that intrusive pointers are frowned upon. For example this is from the boost::intrusive_ptr documentation: "As a general rule, if it isn't obvious whether intrusive_ptr...
27
by: rocco.rossi | last post by:
I've been trying to write a function capable of checking if a pointer value is set to NULL, and if it isn't, of deallocating and setting it's value to NULL regardless of the pointer's type. I...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.