modify mem leak, rewrite vector of exercise 3.14

Signed-off-by: maxpcn <maxp@netease.com>