What happens when a pointer is deleted twice


Asked by admin @ in Computer Science viewed by 184 People


What happens when a pointer is deleted twice

Answered by admin @



Answer:

If you delete a pointer and set it to NULL, it it possibly cannot have an adverse effect. It is safe. However, if a pointer is deleted an not nullified  then it can cause a trap

Explanation:

I know that a "deleting the same memory twice" error can happen when two pointers address the same dynamically allocated object. If delete is applied to one of the pointers then the object's memory is returned to the free store. If we subsequently delete the second pointer then the free store may be corrupted.


Similar Questions

Overcoming fixed mindset: a step-by-step guide to cultivating a growth mindset

Asked by wiki @ in Health viewed by 1320 persons

Which of the following would best complete this list?

Asked by wiki @ in Social Studies viewed by 767 persons

What had the king decided to do before he saw the spider

Asked by vanshika149 @ in English viewed by 1175 persons

Describe the karez in your own words

Asked by rajesh064 @ in English viewed by 1347 persons

What is 8 + (x + 5)?

Asked by jaylord7 @ in Mathematics viewed by 1128 persons

What is the topic of the info grapher

Asked by jesus643 @ in History viewed by 1528 persons

Elephant kills 11 in nepal , woman rescued from a friendly dolphine

Asked by kavin044 @ in English viewed by 1401 persons

(-3,0);slope =2/3

Asked by timothy2 @ in Biology viewed by 1686 persons

Which is an example of situational irony in "wherefore art thou romeo?”

Asked by noah5213 @ in English viewed by 1616 persons

How to enhance knowledge regarding environmental factors through capsim?

Asked by wiki @ in Business viewed by 1882 persons

Most viewed questions in Computer Science


A programmer mistakenly writes gor instead of for

Asked by admin @ in Computer Science viewed by 19033 persons


Domestic data entry operator ncert book class 9 solutions

Asked by admin @ in Computer Science viewed by 15819 persons


Information technology code 402 class 9 solutions chapter 1

Asked by admin @ in Computer Science viewed by 10980 persons



Ncert solutions for class 8 computer chapter 1 computer system

Asked by admin @ in Computer Science viewed by 10412 persons


A scrum team works on a 4 weeks sprint

Asked by admin @ in Computer Science viewed by 8726 persons


Which of the following occupies more memory in c

Asked by admin @ in Computer Science viewed by 8148 persons



A database of motor vehicles has the base entity

Asked by admin @ in Computer Science viewed by 7849 persons


The network architecture can be termed as a mcq

Asked by admin @ in Computer Science viewed by 6496 persons


Cat5 and cat6 cabling refer to which reference model layer

Asked by admin @ in Computer Science viewed by 5799 persons



Class 7 computer chapter 3 questions and answers

Asked by admin @ in Computer Science viewed by 5701 persons


Choose the correct options about usability and user experience

Asked by admin @ in Computer Science viewed by 5483 persons


Which advocates daily team meetings for coordination and integration

Asked by admin @ in Computer Science viewed by 4989 persons



Which three security features match the database security level

Asked by admin @ in Computer Science viewed by 4979 persons


Which of the dbms package is not available

Asked by admin @ in Computer Science viewed by 4693 persons


________ aid a business grow and attain its objectives

Asked by admin @ in Computer Science viewed by 4494 persons