menu
Qammunity
Login
Register
My account
Edit my Profile
Private messages
My favorites
Ask a Question
Questions
Unanswered
Tags
Categories
Ask a Question
To help prevent memory leaks from occurring in c++ 11, a ________ automatically deletes a chunk of dynamically allocated memory when the memory is no longer being used.
asked
Jan 5, 2018
53.9k
views
1
vote
To help prevent memory leaks from occurring in c++ 11, a ________ automatically deletes a chunk of dynamically allocated memory when the memory is no longer being used.
Computers and Technology
high-school
David Lin
asked
by
David Lin
8.3k
points
answer
comment
share this
share
0 Comments
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
1
Answer
6
votes
The answer is
smart pointers
. Smart pointers are wrappers for raw pointers or as I like to call them
dumb pointers
.
In C++, it is guaranteed that the deconstructor will be called when the object goes out of scope.
Istruble
answered
Jan 10, 2018
by
Istruble
8.3k
points
ask related question
comment
share this
0 Comments
Please
log in
or
register
to add a comment.
← Prev Question
Next Question →
Related questions
asked
Jan 10, 2020
20.1k
views
To help prevent memory leaks from occurring in C++ 11, a ________ automatically deletes a chunk of dynamically allocated memory when the memory is no longer being used. -dereferenced pointer -smart pointer
RRStoyanov
asked
Jan 10, 2020
by
RRStoyanov
8.0k
points
Computers and Technology
high-school
1
answer
1
vote
20.1k
views
asked
Nov 7, 2024
159k
views
Using C. pseudocode, or pseudo-C wite a function that does the following Takes in an input of a pointer to an integer array that has been dynamically allocated. Free the dynamically allocated memory.
Emre Alparslan
asked
Nov 7, 2024
by
Emre Alparslan
8.7k
points
Computers and Technology
high-school
1
answer
5
votes
159k
views
asked
Oct 22, 2024
120k
views
C++ Dynamic Memory 1. Create a dynamically allocated ** vector of FIXED size. (5 for example) 2. Read a string from the keyboard 3. Store it in the vector (keep a counter) 4. When the vector hits maximum
Louis Brandy
asked
Oct 22, 2024
by
Louis Brandy
7.2k
points
Engineering
high-school
1
answer
0
votes
120k
views
Ask a Question
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.
9.4m
questions
12.2m
answers
Other Questions
“What does it mean when we “rework” copyrighted material?”
The book shows how to add and subtract binary and decimal numbers. However, other numbering systems are also very popular when dealing with computers. The octal (base 8) numbering system is one of these.
Seven basic internal components found in a computer tower
Please help me ! All you do is just put it it all in your own words ! Please this is for my reported card!i don't know how to put it in my own words because my English is not that good!
Disadvantages of using animation in advertising? advantages and disadvantages of using animation for education? advantages and disadvantages of using animation in entertainment?
Twitter
WhatsApp
Facebook
Reddit
LinkedIn
Email
Link Copied!
Copy
Search Qammunity