Created
December 26, 2018 06:57
-
-
Save YumaInaura/798cff56fffa73a1928b2bc3d8a5c64f to your computer and use it in GitHub Desktop.
#python #初心者 #gc #ガベージコレクション #勉強 したい #rubyist @YumaInaura ref: https://qiita.com/YumaInaura/items/db76b3d61afd3922f75b
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# コールバック関数を定義する | |
def callback(phase, info): | |
print(phase, info) | |
gc.callbacks.append(callback) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gc.disable() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gc.collect() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment