I do not think so.  The global $all_rules varialble is released with the "unset($GLOBALS['all_rules']);" call.  The other variable ($enabled_rules) is just local function scope and is destroyed upon function exit.