Move global user cache to a WeakValueDictionary.

This commit is contained in:
Rapptz committed 2017-01-04 05:16:59 -05:00
1 parent f8a5d890fe
commit 808a05ff2d
3 files changed
+19 -3

No files matched your search

+1 -1
View File
@@ -61,7 +61,7 @@ class User(discord.abc.Messageable):
Specifies if the user is a bot account.
"""
__slots__ = ('name', 'id', 'discriminator', 'avatar', 'bot', '_state')
__slots__ = ('name', 'id', 'discriminator', 'avatar', 'bot', '_state', '__weakref__')
def __init__(self, *, state, data):
self._state = state