SlideShare une entreprise Scribd logo
1  sur  44
Memory Management in C++ Advanced techniques and idioms -ShriKant Vashishtha
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Distinct Memory areas in C++ ,[object Object],[object Object],[object Object],[object Object],[object Object]
Distinct Memory areas in C++ ,[object Object],[object Object],[object Object],[object Object]
Distinct Memory areas in C++ ,[object Object],[object Object],[object Object],[object Object],[object Object]
Distinct Memory areas in C++ ,[object Object],[object Object],[object Object],[object Object]
Distinct Memory areas in C++ ,[object Object],[object Object],[object Object],[object Object],[object Object]
Pointers Vs References ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Pointers Vs References ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Pointers Vs References ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Conclusions: Pointers Vs References ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Conclusions: Pointers Vs References ,[object Object],[object Object]
Conclusions: Pointers Vs References ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
‘new’ operator ,[object Object],[object Object],[object Object],[object Object]
‘ new’  operator Vs  operator  new ,[object Object],[object Object],[object Object],[object Object]
‘ new’  operator Vs  operator  new ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
‘ new’  operator Vs  operator  new ,[object Object]
Placement  new ,[object Object],[object Object],[object Object]
Placement  new ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Summary:  new  operator Vs  operator  new Vs placement  new ,[object Object],[object Object],[object Object],[object Object]
The C++ Object Model ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Float_x ---------------------- __vptr__Point --------------------- --------------------- Point::~Point() Point::print(ostream &) static int Point:: _point_count static int Point::PointCount() Point pt; Virtual table for Point type_info for Point Point:: Point(float) Float Point::x()
The C++ Object Model ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
C++ Object Model: Evaluation ,[object Object],[object Object]
C++ Object Model: Inheritance ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],The most compact and the most efficient access of base class data members Drawback: Any change to data members requires recompiling
C++ Object Model: Object Mechanics ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],expand X * px = new X 1. construct _result 2. result replaces local xx expand xx.foo(): suppress virtual mechanics expand px->foo() using virtual mechanics expand delete px;
The type of a Pointer ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Can only hold an address and not actually operate on the object it addresses
Object deletion and Memory deallocation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Object deletion and Memory deallocation ,[object Object]
Object deletion and Memory deallocation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
operator   delete  function ,[object Object],[object Object],[object Object],[object Object]
C++ equivalent of malloc-free ,[object Object],[object Object]
Arrays ,[object Object],[object Object]
Why overload new/delete operator? ,[object Object]
Common memory problems ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Common memory problems ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Common memory problems ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Common memory problems ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Common memory problems ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Problems with Pointer ,[object Object],[object Object],[object Object],[object Object],[object Object]
Solutions to the problems with Pointers
Use Destructors ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Read animal info from istream object and return a pointer to the object of appropriate ALA type Can lead to resource leak in exceptional conditions.
Use Destructors ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Use Destructors ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Save ptr to object delete ptr to object
Smart Pointers(auto_ptr template) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Save ptr to object delete ptr to object

Contenu connexe

Tendances

Standard template library
Standard template libraryStandard template library
Standard template libraryJancypriya M
 
Constructor in java
Constructor in javaConstructor in java
Constructor in javaHitesh Kumar
 
C++ Memory Management
C++ Memory ManagementC++ Memory Management
C++ Memory ManagementAnil Bapat
 
constructors in java ppt
constructors in java pptconstructors in java ppt
constructors in java pptkunal kishore
 
Static Data Members and Member Functions
Static Data Members and Member FunctionsStatic Data Members and Member Functions
Static Data Members and Member FunctionsMOHIT AGARWAL
 
Event Handling in java
Event Handling in javaEvent Handling in java
Event Handling in javaGoogle
 
virtual function
virtual functionvirtual function
virtual functionVENNILAV6
 
Class and Objects in Java
Class and Objects in JavaClass and Objects in Java
Class and Objects in JavaSpotle.ai
 
Constructor and Types of Constructors
Constructor and Types of ConstructorsConstructor and Types of Constructors
Constructor and Types of ConstructorsDhrumil Panchal
 
Friend functions
Friend functions Friend functions
Friend functions Megha Singh
 

Tendances (20)

6. static keyword
6. static keyword6. static keyword
6. static keyword
 
Constructor ppt
Constructor pptConstructor ppt
Constructor ppt
 
Standard template library
Standard template libraryStandard template library
Standard template library
 
Arrays and Strings
Arrays and Strings Arrays and Strings
Arrays and Strings
 
Constructor in java
Constructor in javaConstructor in java
Constructor in java
 
C++ Memory Management
C++ Memory ManagementC++ Memory Management
C++ Memory Management
 
constructors in java ppt
constructors in java pptconstructors in java ppt
constructors in java ppt
 
Static Data Members and Member Functions
Static Data Members and Member FunctionsStatic Data Members and Member Functions
Static Data Members and Member Functions
 
Event Handling in java
Event Handling in javaEvent Handling in java
Event Handling in java
 
Java constructors
Java constructorsJava constructors
Java constructors
 
virtual function
virtual functionvirtual function
virtual function
 
Constructors and Destructors
Constructors and DestructorsConstructors and Destructors
Constructors and Destructors
 
Java interfaces
Java interfacesJava interfaces
Java interfaces
 
User defined functions
User defined functionsUser defined functions
User defined functions
 
Java input
Java inputJava input
Java input
 
Class and Objects in Java
Class and Objects in JavaClass and Objects in Java
Class and Objects in Java
 
Constructor and Types of Constructors
Constructor and Types of ConstructorsConstructor and Types of Constructors
Constructor and Types of Constructors
 
Method overriding
Method overridingMethod overriding
Method overriding
 
Friend functions
Friend functions Friend functions
Friend functions
 
Java: GUI
Java: GUIJava: GUI
Java: GUI
 

Similaire à C++ Memory Management Techniques - Const, Stack, Heap, References vs Pointers

C questions
C questionsC questions
C questionsparm112
 
New microsoft office word document (2)
New microsoft office word document (2)New microsoft office word document (2)
New microsoft office word document (2)rashmita_mishra
 
Unit vi(dsc++)
Unit vi(dsc++)Unit vi(dsc++)
Unit vi(dsc++)Durga Devi
 
CS225_Prelecture_Notes 2nd
CS225_Prelecture_Notes 2ndCS225_Prelecture_Notes 2nd
CS225_Prelecture_Notes 2ndEdward Chen
 
Static Keyword Static is a keyword in C++ used to give special chara.pdf
  Static Keyword Static is a keyword in C++ used to give special chara.pdf  Static Keyword Static is a keyword in C++ used to give special chara.pdf
Static Keyword Static is a keyword in C++ used to give special chara.pdfKUNALHARCHANDANI1
 
CLASSES, STRUCTURE,UNION in C++
CLASSES, STRUCTURE,UNION in C++CLASSES, STRUCTURE,UNION in C++
CLASSES, STRUCTURE,UNION in C++Prof Ansari
 
C++ Interview Question And Answer
C++ Interview Question And AnswerC++ Interview Question And Answer
C++ Interview Question And AnswerJagan Mohan Bishoyi
 
C++ questions And Answer
C++ questions And AnswerC++ questions And Answer
C++ questions And Answerlavparmar007
 
Memory Management C++ (Peeling operator new() and delete())
Memory Management C++ (Peeling operator new() and delete())Memory Management C++ (Peeling operator new() and delete())
Memory Management C++ (Peeling operator new() and delete())Sameer Rathoud
 
Dynamic memory allocation in c++
Dynamic memory allocation in c++Dynamic memory allocation in c++
Dynamic memory allocation in c++Tech_MX
 
Classes & objects new
Classes & objects newClasses & objects new
Classes & objects newlykado0dles
 
1183 c-interview-questions-and-answers
1183 c-interview-questions-and-answers1183 c-interview-questions-and-answers
1183 c-interview-questions-and-answersAkash Gawali
 
Uncommon Design Patterns
Uncommon Design PatternsUncommon Design Patterns
Uncommon Design PatternsStefano Fago
 
16858 memory management2
16858 memory management216858 memory management2
16858 memory management2Aanand Singh
 
all i need is these two filesCreate VectorContainer.hppCreat.docx
all i need is these two filesCreate VectorContainer.hppCreat.docxall i need is these two filesCreate VectorContainer.hppCreat.docx
all i need is these two filesCreate VectorContainer.hppCreat.docxjack60216
 

Similaire à C++ Memory Management Techniques - Const, Stack, Heap, References vs Pointers (20)

C questions
C questionsC questions
C questions
 
New microsoft office word document (2)
New microsoft office word document (2)New microsoft office word document (2)
New microsoft office word document (2)
 
Overloading
OverloadingOverloading
Overloading
 
Lecture5
Lecture5Lecture5
Lecture5
 
Unit vi(dsc++)
Unit vi(dsc++)Unit vi(dsc++)
Unit vi(dsc++)
 
CS225_Prelecture_Notes 2nd
CS225_Prelecture_Notes 2ndCS225_Prelecture_Notes 2nd
CS225_Prelecture_Notes 2nd
 
Static Keyword Static is a keyword in C++ used to give special chara.pdf
  Static Keyword Static is a keyword in C++ used to give special chara.pdf  Static Keyword Static is a keyword in C++ used to give special chara.pdf
Static Keyword Static is a keyword in C++ used to give special chara.pdf
 
CLASSES, STRUCTURE,UNION in C++
CLASSES, STRUCTURE,UNION in C++CLASSES, STRUCTURE,UNION in C++
CLASSES, STRUCTURE,UNION in C++
 
C++ Interview Question And Answer
C++ Interview Question And AnswerC++ Interview Question And Answer
C++ Interview Question And Answer
 
C++ questions And Answer
C++ questions And AnswerC++ questions And Answer
C++ questions And Answer
 
Memory Management C++ (Peeling operator new() and delete())
Memory Management C++ (Peeling operator new() and delete())Memory Management C++ (Peeling operator new() and delete())
Memory Management C++ (Peeling operator new() and delete())
 
Dynamic memory allocation in c++
Dynamic memory allocation in c++Dynamic memory allocation in c++
Dynamic memory allocation in c++
 
Classes & objects new
Classes & objects newClasses & objects new
Classes & objects new
 
1183 c-interview-questions-and-answers
1183 c-interview-questions-and-answers1183 c-interview-questions-and-answers
1183 c-interview-questions-and-answers
 
Linked list
Linked listLinked list
Linked list
 
Uncommon Design Patterns
Uncommon Design PatternsUncommon Design Patterns
Uncommon Design Patterns
 
Unit ii
Unit iiUnit ii
Unit ii
 
CPP Homework Help
CPP Homework HelpCPP Homework Help
CPP Homework Help
 
16858 memory management2
16858 memory management216858 memory management2
16858 memory management2
 
all i need is these two filesCreate VectorContainer.hppCreat.docx
all i need is these two filesCreate VectorContainer.hppCreat.docxall i need is these two filesCreate VectorContainer.hppCreat.docx
all i need is these two filesCreate VectorContainer.hppCreat.docx
 

Plus de ShriKant Vashishtha

Evolution of Agile world with Lean Startup Concepts
 Evolution of Agile world with Lean Startup Concepts Evolution of Agile world with Lean Startup Concepts
Evolution of Agile world with Lean Startup ConceptsShriKant Vashishtha
 
How to Break the Requirements into User Stories
How to Break the Requirements into User StoriesHow to Break the Requirements into User Stories
How to Break the Requirements into User StoriesShriKant Vashishtha
 
Agile Maintenance by ShriKant Vashishtha
Agile Maintenance by ShriKant VashishthaAgile Maintenance by ShriKant Vashishtha
Agile Maintenance by ShriKant VashishthaShriKant Vashishtha
 
Working With Augmented Distributed Agile Team In Legacy Application
Working With Augmented Distributed Agile Team In Legacy ApplicationWorking With Augmented Distributed Agile Team In Legacy Application
Working With Augmented Distributed Agile Team In Legacy ApplicationShriKant Vashishtha
 
Agile FAQs by ShriKant Vashishtha
Agile FAQs by ShriKant VashishthaAgile FAQs by ShriKant Vashishtha
Agile FAQs by ShriKant VashishthaShriKant Vashishtha
 
Working effectively with legacy code
Working effectively with legacy codeWorking effectively with legacy code
Working effectively with legacy codeShriKant Vashishtha
 
TheOtherPages Pagination Framework by Shrikant Vashishtha
TheOtherPages Pagination Framework by Shrikant VashishthaTheOtherPages Pagination Framework by Shrikant Vashishtha
TheOtherPages Pagination Framework by Shrikant VashishthaShriKant Vashishtha
 
Caching fundamentals by Shrikant Vashishtha
Caching fundamentals by Shrikant VashishthaCaching fundamentals by Shrikant Vashishtha
Caching fundamentals by Shrikant VashishthaShriKant Vashishtha
 
Pair Programming Explained By Shrikant Vashishtha
Pair Programming Explained  By Shrikant VashishthaPair Programming Explained  By Shrikant Vashishtha
Pair Programming Explained By Shrikant VashishthaShriKant Vashishtha
 
Management and Self Learning Lessons from Indian Mythology
Management and Self Learning Lessons from Indian MythologyManagement and Self Learning Lessons from Indian Mythology
Management and Self Learning Lessons from Indian MythologyShriKant Vashishtha
 

Plus de ShriKant Vashishtha (14)

Evolution of Agile world with Lean Startup Concepts
 Evolution of Agile world with Lean Startup Concepts Evolution of Agile world with Lean Startup Concepts
Evolution of Agile world with Lean Startup Concepts
 
Distributed Agile Patterns
Distributed Agile PatternsDistributed Agile Patterns
Distributed Agile Patterns
 
What is Agile Testing
What is Agile TestingWhat is Agile Testing
What is Agile Testing
 
Pair Programming and XP Values
Pair Programming and XP ValuesPair Programming and XP Values
Pair Programming and XP Values
 
How to build a fun team
How to build a fun teamHow to build a fun team
How to build a fun team
 
How to Break the Requirements into User Stories
How to Break the Requirements into User StoriesHow to Break the Requirements into User Stories
How to Break the Requirements into User Stories
 
Agile Maintenance by ShriKant Vashishtha
Agile Maintenance by ShriKant VashishthaAgile Maintenance by ShriKant Vashishtha
Agile Maintenance by ShriKant Vashishtha
 
Working With Augmented Distributed Agile Team In Legacy Application
Working With Augmented Distributed Agile Team In Legacy ApplicationWorking With Augmented Distributed Agile Team In Legacy Application
Working With Augmented Distributed Agile Team In Legacy Application
 
Agile FAQs by ShriKant Vashishtha
Agile FAQs by ShriKant VashishthaAgile FAQs by ShriKant Vashishtha
Agile FAQs by ShriKant Vashishtha
 
Working effectively with legacy code
Working effectively with legacy codeWorking effectively with legacy code
Working effectively with legacy code
 
TheOtherPages Pagination Framework by Shrikant Vashishtha
TheOtherPages Pagination Framework by Shrikant VashishthaTheOtherPages Pagination Framework by Shrikant Vashishtha
TheOtherPages Pagination Framework by Shrikant Vashishtha
 
Caching fundamentals by Shrikant Vashishtha
Caching fundamentals by Shrikant VashishthaCaching fundamentals by Shrikant Vashishtha
Caching fundamentals by Shrikant Vashishtha
 
Pair Programming Explained By Shrikant Vashishtha
Pair Programming Explained  By Shrikant VashishthaPair Programming Explained  By Shrikant Vashishtha
Pair Programming Explained By Shrikant Vashishtha
 
Management and Self Learning Lessons from Indian Mythology
Management and Self Learning Lessons from Indian MythologyManagement and Self Learning Lessons from Indian Mythology
Management and Self Learning Lessons from Indian Mythology
 

Dernier

The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxfnnc6jmgwh
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 

Dernier (20)

The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 

C++ Memory Management Techniques - Const, Stack, Heap, References vs Pointers

  • 1. Memory Management in C++ Advanced techniques and idioms -ShriKant Vashishtha
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40. Solutions to the problems with Pointers
  • 41.
  • 42.
  • 43.
  • 44.