Unbinding the events from Notice reply and favor for possible memory

leaks
This commit is contained in:
Sarven Capadisli 2009-11-16 22:16:08 +00:00
parent 629532e2da
commit be73757131

View File

@ -80,6 +80,9 @@ RealtimeUpdate = {
$("#notices_primary .notice:first").fadeIn(1000); $("#notices_primary .notice:first").fadeIn(1000);
if ($('#notices_primary .notice').length > RealtimeUpdate._maxnotices) { if ($('#notices_primary .notice').length > RealtimeUpdate._maxnotices) {
$("#notices_primary .notice:last .form_disfavor").unbind('submit');
$("#notices_primary .notice:last .form_favor").unbind('submit');
$("#notices_primary .notice:last #notice_in-reply-to").unbind('click');
$("#notices_primary .notice:last").remove(); $("#notices_primary .notice:last").remove();
} }