Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Grabage Collector in ruby, Why should I care ?
Search
Aboobacker MK
August 12, 2017
Programming
0
66
Grabage Collector in ruby, Why should I care ?
Ruby GC talk for Deccan ruby conf
Aboobacker MK
August 12, 2017
Tweet
Share
More Decks by Aboobacker MK
See All by Aboobacker MK
Conversational bots in ruby
tachyons
0
63
Other Decks in Programming
See All in Programming
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
690
Fluid Templating in TYPO3 14
s2b
0
130
AIエージェント、”どう作るか”で差は出るか? / AI Agents: Does the "How" Make a Difference?
rkaga
4
2k
並行開発のためのコードレビュー
miyukiw
0
290
登壇資料を作る時に意識していること #登壇資料_findy
konifar
4
1.5k
Smart Handoff/Pickup ガイド - Claude Code セッション管理
yukiigarashi
0
140
CSC307 Lecture 09
javiergs
PRO
1
840
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
470
Package Management Learnings from Homebrew
mikemcquaid
0
230
Oxlint JS plugins
kazupon
1
980
AIによる高速開発をどう制御するか? ガードレール設置で開発速度と品質を両立させたチームの事例
tonkotsuboy_com
7
2.4k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
600
Featured
See All Featured
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3k
Exploring anti-patterns in Rails
aemeredith
2
250
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
330
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
Believing is Seeing
oripsolob
1
56
What does AI have to do with Human Rights?
axbom
PRO
0
2k
How STYLIGHT went responsive
nonsquared
100
6k
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
7.9k
Site-Speed That Sticks
csswizardry
13
1.1k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
180
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
100
Transcript
कचरा गोळा करणारा मी काळजी का क े ली पा
हजे 1
2
3 . 1
3 . 2
3 . 3
4
5
6
7
8
9
10
a = [ {c: 'd'} ] ... a = nil
11
12
13
14
a = [ {c: 'd'} ] 15
16
17
18
module GC def self.run mark sweep end def self.mark root_objects.each
do |root_obj| root_obj.associated_objects.each do |object| obj.update(marked: true) end end end def self.sweep objects.where(marked: false).destroy_all objects.update_all(marked: false) end end 19
20
21
22
23 . 1
23 . 2
24
25
26
module GC def self.run objects.update_all(color: white) clearly_living_objects.update_all(color: grey) objects.where(color: grey).each
do |object| object.references.update_all(color: grey) object.update(color: black) end objects.where(color: white).destroy_all end end 27
28
29
30
31
32
33 . 1
33 . 2
100_000.times do foo = "a string" end RETAINED = []
100_000.times do RETAINED << "a string" end 34
Model.all.each do |item| process(item) end Model.find_each do |item| process(item) end
Model.select(:id,:other, :necessary, :attributes) 35 . 1
class Thing; end list = Array.new(1000) { Thing.new } list.each
do |item| puts item end list = nil class Thing; end list = Array.new(1000) { Thing.new } while list.count > 0 puts list.pop end 35 . 2
36
37
38