Why don’t smart pointers, using shared_ptr, work when there are circular references among nodes?

What will be an ideal response?


Reference counting is used to keep track of how many variables point to a node. When the count reaches zero, the node is deleted. When there is a circular reference the count will never reach zero even if there is no live variable that references the node.

Computer Science & Information Technology

You might also like to view...

Unlike the default format for text in a text box, the default alignment for shapes with text in them is _____ text.

A. left-aligned B. right-aligned C. center-aligned D. top-aligned

Computer Science & Information Technology

Read the following sentence and key the correct terminal punctuation mark in the blank.Will the server be down all morning _____?

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

A malicious individual used an unattended customer service kiosk in a busy store to change the prices of several products. The alteration was not noticed until several days later and resulted in the loss of several thousand dollars for the store. Which of the following would BEST prevent this from occurring again?

A. Password expiration B. Screen locks C. Inventory control D. Asset tracking

Computer Science & Information Technology

Which of the following technologies is responsible for communication with the CPU?

A. eSATA B. PCI express C. Southbridge D. Northbridge

Computer Science & Information Technology