Avoiding memory leaks in C++

0 votes
I'm looking for some general tips on making sure that I don't leak memory in my C++ codes. Like which dynamically allocated memory should get free when and other best practices regarding the same?
Nov 5, 2018 in Others by Bharani
• 4,550 points
70 views

1 answer to this question.

0 votes

If you use smart pointers at all places where it could be applicable, you wouldn't have to worry about managing memory manually. Plus, smart pointers are now available as a C++ standard version called C++11. You should definitely check these out: Boost lib, TR1, and smart pointers.

answered Nov 5, 2018 by nirvana
• 3,060 points

Related Questions In Others

0 votes
1 answer

Reducing sequences in an array of strings

I've written a C# app to solves ...READ MORE

answered Nov 2, 2018 in Others by DataKing99
• 8,100 points
40 views
0 votes
1 answer

Using/Handling colon inside a JSF generated HTML element ID in CSS selector

Yes, you can.  Just Backslash (\) the colon.  Like ...READ MORE

answered Nov 14, 2018 in Others by DataKing99
• 8,100 points
191 views
0 votes
1 answer

Using unserialize in PHP throws the same error repeatedly

I googled 'Node no longer exists', and ...READ MORE

answered Nov 14, 2018 in Others by DataKing99
• 8,100 points
96 views
0 votes
2 answers

How do neural networks used in AI and deep learning learn?

A neural network is a hardware or software ...READ MORE

answered Apr 8 in Others by SA
• 1,030 points
68 views
0 votes
1 answer

How to get the URL of the current tab in Google Chrome?

There are different ways of doing this:- You ...READ MORE

answered Dec 21, 2018 in Others by Nabarupa
61 views
0 votes
1 answer

setuptools: build shared libary from C++ code, then build Cython wrapper linked to shared libary

There is a seemingly undocumented feature of setup that ...READ MORE

answered Sep 11, 2018 in Python by Priyaj
• 56,160 points
21 views
0 votes
1 answer

Python : Short Integers

Firstly, if you're doing any sort of ...READ MORE

answered Sep 18, 2018 in IoT (Internet of Things) by Annie97
• 2,190 points
21 views
0 votes
1 answer

setuptools: build shared libary from C++ code, then build Cython wrapper linked to shared libary

There is a seemingly undocumented feature of setup that ...READ MORE

answered Sep 21, 2018 in Python by Priyaj
• 56,160 points
83 views
0 votes
1 answer

How to pass large records to map/reduce tasks?

Hadoop is not designed for records about ...READ MORE

answered Sep 25, 2018 in Big Data Hadoop by Frankie
• 9,810 points
56 views
0 votes
1 answer

Events & Threading in Windows Forms

I don't think you should be updating ...READ MORE

answered Nov 9, 2018 in Others by nirvana
• 3,060 points
50 views