SlideShare uma empresa Scribd logo
1 de 8
Memory management
Pointers and references
•   What is pointer
•   How it works
•   What is reference
•   Operator ->
Passing arguments
• Passing by value
• Passing by pointer
• Passing by reference
Constructors and destructors
• What is it
• Why we need it
• When it is called
Heap and stack
• What is stack variable
• What is heap variable
• How to work with them
How to work with heap variables
• Allocate memory ONLY in constructor
• Deallocate memory ONLY in destructor
• new[] and delete[]
Copy constructors
• What it is
• When it is called
• What code should
Rule of three
• Destructor
• Copy constructor
• Assignment operator

Mais conteúdo relacionado

Mais procurados

Mais procurados (11)

Create a RESTful API with NodeJS, Express and MongoDB
Create a RESTful API with NodeJS, Express and MongoDBCreate a RESTful API with NodeJS, Express and MongoDB
Create a RESTful API with NodeJS, Express and MongoDB
 
JavaScript State of the Union - Jan 2013
JavaScript State of the Union - Jan 2013JavaScript State of the Union - Jan 2013
JavaScript State of the Union - Jan 2013
 
みんなのNode.js
みんなのNode.jsみんなのNode.js
みんなのNode.js
 
Xamarin & MvvmCross in depth
Xamarin & MvvmCross in depthXamarin & MvvmCross in depth
Xamarin & MvvmCross in depth
 
The Same-Origin Saga
The Same-Origin SagaThe Same-Origin Saga
The Same-Origin Saga
 
Round trip - What changes & what doesn't
Round trip - What changes & what doesn'tRound trip - What changes & what doesn't
Round trip - What changes & what doesn't
 
Going Offline with JS
Going Offline with JSGoing Offline with JS
Going Offline with JS
 
Brief overview of TypeScript - Ljubljana JavaScript Users Group
 Brief overview of TypeScript - Ljubljana JavaScript Users Group Brief overview of TypeScript - Ljubljana JavaScript Users Group
Brief overview of TypeScript - Ljubljana JavaScript Users Group
 
MongoDB London PHP
MongoDB London PHPMongoDB London PHP
MongoDB London PHP
 
MongoDB, Node.js And You: PART II
MongoDB, Node.js And You: PART IIMongoDB, Node.js And You: PART II
MongoDB, Node.js And You: PART II
 
Use all the buzzwords
Use all the buzzwordsUse all the buzzwords
Use all the buzzwords
 

Destaque

cpp-2013 #11 Constness and Exceptions
cpp-2013 #11 Constness and Exceptionscpp-2013 #11 Constness and Exceptions
cpp-2013 #11 Constness and Exceptions
Amazon Web Services
 
cpp-2013 #12 Управління пам’яттю Частина 2
cpp-2013 #12 Управління пам’яттю Частина 2cpp-2013 #12 Управління пам’яттю Частина 2
cpp-2013 #12 Управління пам’яттю Частина 2
Amazon Web Services
 
Import,export procedure
Import,export procedureImport,export procedure
Import,export procedure
rishnrish
 
Export procedure
Export procedureExport procedure
Export procedure
Jay Parekh
 
EXPORT PROCEDURE & DOCUMENTATION
EXPORT PROCEDURE & DOCUMENTATIONEXPORT PROCEDURE & DOCUMENTATION
EXPORT PROCEDURE & DOCUMENTATION
vikas chauhan
 
Import & export presentation
Import & export presentationImport & export presentation
Import & export presentation
Eric Lee
 
A PROJECT REPORT ON EXPORT PROCESS AND DOCUMENTATION
A PROJECT REPORT ON EXPORT PROCESS AND DOCUMENTATIONA PROJECT REPORT ON EXPORT PROCESS AND DOCUMENTATION
A PROJECT REPORT ON EXPORT PROCESS AND DOCUMENTATION
Sagar Anand
 

Destaque (16)

cpp-2013 #11 Constness and Exceptions
cpp-2013 #11 Constness and Exceptionscpp-2013 #11 Constness and Exceptions
cpp-2013 #11 Constness and Exceptions
 
cpp-2013 #12 Управління пам’яттю Частина 2
cpp-2013 #12 Управління пам’яттю Частина 2cpp-2013 #12 Управління пам’яттю Частина 2
cpp-2013 #12 Управління пам’яттю Частина 2
 
cpp-2013 #16 Automated testing
cpp-2013 #16 Automated testingcpp-2013 #16 Automated testing
cpp-2013 #16 Automated testing
 
cpp-2013 #20 Best practices
cpp-2013 #20 Best practicescpp-2013 #20 Best practices
cpp-2013 #20 Best practices
 
cpp-2013 #18 Qt Part 2
cpp-2013 #18 Qt Part 2cpp-2013 #18 Qt Part 2
cpp-2013 #18 Qt Part 2
 
cpp-2013 #17 Libraries
cpp-2013 #17 Librariescpp-2013 #17 Libraries
cpp-2013 #17 Libraries
 
High Availability Application Architectures in Amazon VPC (ARC202) | AWS re:I...
High Availability Application Architectures in Amazon VPC (ARC202) | AWS re:I...High Availability Application Architectures in Amazon VPC (ARC202) | AWS re:I...
High Availability Application Architectures in Amazon VPC (ARC202) | AWS re:I...
 
Aspect-Oriented Programming (AOP) in .NET
Aspect-Oriented Programming (AOP) in .NETAspect-Oriented Programming (AOP) in .NET
Aspect-Oriented Programming (AOP) in .NET
 
Export management ppt
Export management pptExport management ppt
Export management ppt
 
Import,export procedure
Import,export procedureImport,export procedure
Import,export procedure
 
Export procedure
Export procedureExport procedure
Export procedure
 
EXPORT PROCEDURE & DOCUMENTATION
EXPORT PROCEDURE & DOCUMENTATIONEXPORT PROCEDURE & DOCUMENTATION
EXPORT PROCEDURE & DOCUMENTATION
 
Export Procedures and Documents
Export Procedures and DocumentsExport Procedures and Documents
Export Procedures and Documents
 
Import & export presentation
Import & export presentationImport & export presentation
Import & export presentation
 
A PROJECT REPORT ON EXPORT PROCESS AND DOCUMENTATION
A PROJECT REPORT ON EXPORT PROCESS AND DOCUMENTATIONA PROJECT REPORT ON EXPORT PROCESS AND DOCUMENTATION
A PROJECT REPORT ON EXPORT PROCESS AND DOCUMENTATION
 
EXPORT IMPORT
EXPORT IMPORTEXPORT IMPORT
EXPORT IMPORT
 

Mais de Amazon Web Services

Mais de Amazon Web Services (12)

cpp-2013 #19 Concurrency
cpp-2013 #19 Concurrencycpp-2013 #19 Concurrency
cpp-2013 #19 Concurrency
 
cpp-2013 #15 Databases
cpp-2013 #15 Databasescpp-2013 #15 Databases
cpp-2013 #15 Databases
 
cpp-2013 #14 Основи Qt
cpp-2013 #14 Основи Qtcpp-2013 #14 Основи Qt
cpp-2013 #14 Основи Qt
 
cpp-2013 #13 C++11
cpp-2013 #13 C++11cpp-2013 #13 C++11
cpp-2013 #13 C++11
 
cpp-2013 #9 STL Algorithms Part 1
cpp-2013 #9 STL Algorithms Part 1cpp-2013 #9 STL Algorithms Part 1
cpp-2013 #9 STL Algorithms Part 1
 
cpp-2013 #8 STL Containers Part 2
cpp-2013 #8 STL Containers Part 2cpp-2013 #8 STL Containers Part 2
cpp-2013 #8 STL Containers Part 2
 
cpp-2013 #7 Templates and STL Containers
cpp-2013 #7 Templates and STL Containerscpp-2013 #7 Templates and STL Containers
cpp-2013 #7 Templates and STL Containers
 
cpp-2013 #6 OOP Part 2
cpp-2013 #6 OOP Part 2cpp-2013 #6 OOP Part 2
cpp-2013 #6 OOP Part 2
 
cpp-2013 #5 File and network input/output
cpp-2013 #5 File and network input/outputcpp-2013 #5 File and network input/output
cpp-2013 #5 File and network input/output
 
cpp-2013 #3 OOP Basics
cpp-2013 #3 OOP Basicscpp-2013 #3 OOP Basics
cpp-2013 #3 OOP Basics
 
cpp-2013 #2 Organizing your code
cpp-2013 #2 Organizing your codecpp-2013 #2 Organizing your code
cpp-2013 #2 Organizing your code
 
cpp-2013 #1 C++ basics
cpp-2013 #1 C++ basicscpp-2013 #1 C++ basics
cpp-2013 #1 C++ basics
 

cpp-2013 #4 Memory management