473,776 Members | 1,557 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1624
"Pradeep" <pr***********@ gmail.com> wrote in message
news:11******** *************@z 14g2000cwz.goog legroups.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
4056
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 contains these pointers. However, it is unacceptable for my problem, because it limits the number of lists the object can be in to 1. I must have some objects in more than 1 list. Instead of inheriting, I use aggregation: class Node { //...
2
2762
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 the screen, then swap back the original contents of the screen.
110
9960
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 must be an object instead of
6
5427
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) B is derived from A( B: public A) now i want to pass the this* pointer of the derived class(B) to a
2
1421
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 expression ' Do some processing and then. Should I set it to Nothing? Set objNode=Node2 ' Say node1 is some expression
12
16768
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
3172
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 client/user code be responsible for doing it? On what basis should a decision be made favouring either case ?
2
2923
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 better fits your needs than shared_ptr, try a shared_ptr-based design first." This tells me that intrusive pointers are faster and leaner than any of the other alternative other than raw pointers. http://www.boost.org/libs/smart_ptr/smarttests.htm ...
27
2213
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 thought "void ** " should do the trick, but I kept getting the following warning message from gcc: warning: passing argument 1 of 'free_var' from incompatible pointer type which obviously could be solved by doing an explicit cast to (void **)
0
10120
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10061
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9923
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8952
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6722
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5367
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4031
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3622
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2860
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.