SlideShare une entreprise Scribd logo
1  sur  28
Garbage Collection Alex Harui Flex SDK Adobe Systems , Inc.
Garbage Collection: Atomic Model ,[object Object],[object Object],[object Object],[object Object]
Flash Player Memory Management ,[object Object],[object Object],[object Object],[object Object],[object Object],256 bytes 256 bytes 256 bytes 256 bytes 256 bytes 256 bytes 256 bytes 256 bytes 256 bytes … 256 bytes 512 bytes 512 bytes 512 bytes 512 bytes 512 bytes …
Flash Player Memory Management ,[object Object],Used Unused 512 bytes 512 bytes 512 bytes 512 bytes 512 bytes … 512 bytes 512 bytes 512 bytes 512 bytes 512 bytes …
Garbage Collection Does Not Run Constantly ,[object Object],[object Object],[object Object],Used Unused System.totalMemory = 100000 bytes 512 bytes 512 bytes 512 bytes 512 bytes 512 bytes …
Garbage Collection Does Not Run Constantly ,[object Object],[object Object],Used Unused System.totalMemory = 100512 bytes foo = new Foo() 512 bytes 512 bytes 512 bytes 512 bytes 512 bytes …
Garbage Collection Does Not Run Constantly ,[object Object],[object Object],[object Object],Used Unused System.totalMemory = 100512 bytes foo = new Foo(); foo = null; Unused But not GC’d 512 bytes 512 bytes 512 bytes 512 bytes 512 bytes …
Garbage Collection Does Not Run Constantly ,[object Object],[object Object],Used Unused System.totalMemory = 101024 bytes foo = new Foo(); foo = null; foo = new Foo(); Unused But not GC’d 512 bytes 512 bytes 512 bytes 512 bytes 512 bytes …
Garbage Collection Is Only Triggered By Allocations ,[object Object],[object Object],Used Unused Unused But not GC’d Almost out!, Run GC! 512 bytes 512 bytes 512 bytes 512 bytes 512 bytes …
Garbage Collection Is Only Triggered By Allocations ,[object Object]
Garbage Collection Does Not Run Completely ,[object Object],[object Object],[object Object],Used Unused Unused But not GC’d Before 512 bytes 512 bytes 512 bytes 512 bytes 512 bytes … 512 bytes 512 bytes 512 bytes 512 bytes 512 bytes …
Garbage Collection Does Not Run Completely ,[object Object],[object Object],[object Object],Used Unused Unused But not GC’d After 512 bytes 512 bytes 512 bytes 512 bytes 512 bytes … 512 bytes 512 bytes 512 bytes 512 bytes 512 bytes …
Garbage Collection Does Not Always Free OS Memory ,[object Object],[object Object],[object Object],Used Unused Unused But not GC’d Before 512 bytes 512 bytes 512 bytes 512 bytes 512 bytes … 512 bytes 512 bytes 512 bytes 512 bytes 512 bytes …
Garbage Collection Does Not Always Free OS Memory ,[object Object],[object Object],[object Object],Used Unused Unused But not GC’d After Eligible for Release to OS 512 bytes 512 bytes 512 bytes 512 bytes 512 bytes … 512 bytes 512 bytes 512 bytes 512 bytes 512 bytes …
Garbage Collection Is Not Predictable ,[object Object],[object Object]
Detecting Memory Leaks ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Detecting Memory Leaks ,[object Object],[object Object],[object Object],[object Object]
Detecting Memory Leaks ,[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]
Where To Find Memory Leaks ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
How Garbage Collection Works ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
How Garbage Collection Works ,[object Object],[object Object],[object Object],Used Unused Unused But not GC’d .root .application Application Stage SystemManager Model Removed Popup VBox Popup’s Button Button
How Garbage Collection Works ,[object Object],[object Object],[object Object],Used Unused Unused But not GC’d .application Application ApplicationDomain mx.core.Application Model Removed Popup VBox Popup’s Button Button
How Garbage Collection Works ,[object Object],[object Object],Used Unused Unused But not GC’d Stack Dialog instance Application instance ApplicationDomain class Dialog popUp return address Dialog this
Removing EventListeners ,[object Object],[object Object],[object Object],Used Unused Unused But not GC’d .root .application .child Application clickHandler Stage SystemManager ChildComponent clickListeners
Removing EventListeners ,[object Object],[object Object],Used Unused Unused But not GC’d .root .application Application clickHandler Stage SystemManager ChildComponent clickListeners
Removing EventListeners ,[object Object],[object Object],[object Object],[object Object],Used Unused Unused But not GC’d .root .popupChildren PopUp mouseUpHandler Stage SystemManager mouseUpListeners
Removing EventListeners ,[object Object],[object Object],[object Object],[object Object],Used Unused Unused But not GC’d .root .popupChildren weak ref PopUp mouseUpHandler Stage SystemManager mouseUpListeners
Summary ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

Contenu connexe

Similaire à Gc Atomic

Java Garbage Collection, Monitoring, and Tuning
Java Garbage Collection, Monitoring, and TuningJava Garbage Collection, Monitoring, and Tuning
Java Garbage Collection, Monitoring, and Tuning
Carol McDonald
 

Similaire à Gc Atomic (20)

Java Garbage Collection, Monitoring, and Tuning
Java Garbage Collection, Monitoring, and TuningJava Garbage Collection, Monitoring, and Tuning
Java Garbage Collection, Monitoring, and Tuning
 
Profiler Guided Java Performance Tuning
Profiler Guided Java Performance TuningProfiler Guided Java Performance Tuning
Profiler Guided Java Performance Tuning
 
Quantifying the Performance of Garbage Collection vs. Explicit Memory Management
Quantifying the Performance of Garbage Collection vs. Explicit Memory ManagementQuantifying the Performance of Garbage Collection vs. Explicit Memory Management
Quantifying the Performance of Garbage Collection vs. Explicit Memory Management
 
Memory Leaks in Android Applications
Memory Leaks in Android ApplicationsMemory Leaks in Android Applications
Memory Leaks in Android Applications
 
Memory profiler and garbage collector in C#
Memory profiler and garbage collector in C#Memory profiler and garbage collector in C#
Memory profiler and garbage collector in C#
 
Exploring .NET memory management - JetBrains webinar
Exploring .NET memory management - JetBrains webinarExploring .NET memory management - JetBrains webinar
Exploring .NET memory management - JetBrains webinar
 
DotNetFest - Let’s refresh our memory! Memory management in .NET
DotNetFest - Let’s refresh our memory! Memory management in .NETDotNetFest - Let’s refresh our memory! Memory management in .NET
DotNetFest - Let’s refresh our memory! Memory management in .NET
 
JavaScript Best Pratices
JavaScript Best PraticesJavaScript Best Pratices
JavaScript Best Pratices
 
All of Javascript
All of JavascriptAll of Javascript
All of Javascript
 
Garbage collection
Garbage collectionGarbage collection
Garbage collection
 
Beyond the Callback: Yield Control with Javascript Generators
Beyond the Callback: Yield Control with Javascript GeneratorsBeyond the Callback: Yield Control with Javascript Generators
Beyond the Callback: Yield Control with Javascript Generators
 
performance optimization: Memory
performance optimization: Memoryperformance optimization: Memory
performance optimization: Memory
 
JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...
JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...
JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...
 
dotMemory 4 - What's inside?
dotMemory 4 - What's inside?dotMemory 4 - What's inside?
dotMemory 4 - What's inside?
 
Beyond the Basics, Debugging with Firebug and Web Inspector
Beyond the Basics, Debugging with Firebug and Web InspectorBeyond the Basics, Debugging with Firebug and Web Inspector
Beyond the Basics, Debugging with Firebug and Web Inspector
 
Batch file programming
Batch file programmingBatch file programming
Batch file programming
 
Batch file-programming
Batch file-programmingBatch file-programming
Batch file-programming
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
Sporar
SporarSporar
Sporar
 
.NET Fest 2018. Maarten Balliauw. Let’s refresh our memory! Memory management...
.NET Fest 2018. Maarten Balliauw. Let’s refresh our memory! Memory management....NET Fest 2018. Maarten Balliauw. Let’s refresh our memory! Memory management...
.NET Fest 2018. Maarten Balliauw. Let’s refresh our memory! Memory management...
 

Dernier

Dernier (20)

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

Gc Atomic

  • 1. Garbage Collection Alex Harui Flex SDK Adobe Systems , Inc.
  • 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.