...G...PS. [ZBX-8833] adjusted clear() and clear_ext(), so that values array is not freed