Skip to content

Commit

Permalink
fix memory leakage (#43141)
Browse files Browse the repository at this point in the history
  • Loading branch information
2742195759 authored Jun 1, 2022
1 parent 56ae33b commit 126248a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class FunctionCache(object):

def __init__(self):
# Caches the converted static functions. {dygraph_func: static_func}
self._converted_static_func_caches = dict()
self._converted_static_func_caches = weakref.WeakKeyDictionary()
# Caches the converted ast node for same source code. {source_code: ast_root}
self._code_to_ast_caches = dict()
self._dygraph_to_static = DygraphToStaticAst()
Expand Down

0 comments on commit 126248a

Please sign in to comment.