Memory leak?
andresriancho opened this issue · 2 comments
andresriancho commented
I believe this is a rather dumb question, but... the developer needs to remember to call del_user
in order to avoid the memory from filling up with user objects here , right?
It's really common for developers to forget to clean-up, so why not add a signal handler that hooks into https://docs.djangoproject.com/en/dev/ref/signals/#django.core.signals.request_finished and calls del_user
at the end of each HTTP request?
Alir3z4 commented
On both process_response
and process_exception
the user object will be deleted, which means after processing/ending the request.
andresriancho commented
Perfect, I missed that!