SlideShare uma empresa Scribd logo
1 de 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]

Mais conteúdo relacionado

Semelhante a 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
 

Semelhante a 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...
 

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

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
 
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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
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...
 
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
 
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
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
🐬 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)
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 

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.