Add strictness annotations to avoid memory leak.