[Kimchi-devel] [PATCH] Clear out the guests list properly using jQuery

Aline Manera alinefm at linux.vnet.ibm.com
Tue Feb 25 13:31:44 UTC 2014


Reviewed-by: Aline Manera <alinefm at linux.vnet.ibm.com>

On 02/24/2014 09:34 PM, Adam King wrote:
> Clear out the guests list properlt using jQuery empty().
> Setting the html to '' as previous can result in browser memory leaks.
>
> Signed-off-by: Adam King <rak at linux.vnet.ibm.com>
> ---
>   ui/js/src/kimchi.guest_main.js | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/ui/js/src/kimchi.guest_main.js b/ui/js/src/kimchi.guest_main.js
> index b5e7af3..e350373 100644
> --- a/ui/js/src/kimchi.guest_main.js
> +++ b/ui/js/src/kimchi.guest_main.js
> @@ -137,7 +137,7 @@ kimchi.listVmsAuto = function() {
>                   var guestTemplate = kimchi.guestTemplate;
>                   var currentConsoleImages = kimchi.getVmsCurrentConsoleImgs();
>                   var openMenuGuest = kimchi.getOpenMenuVmId();
> -                $('#guestList').html('');
> +                $('#guestList').empty();
>                   $('#guestListField').show();
>                   $('#noGuests').hide();
>




More information about the Kimchi-devel mailing list