Call destructors during reset to avoid memory leak

Otherwise, the following ASAN test would fail:

out/ASAN/dm --config t8888 -m savelayer_initfromprev

Bug: skia:
Change-Id: I464dd419c64dcb06197169cca51253f26c44e93e
Reviewed-on: https://skia-review.googlesource.com/124053
Commit-Queue: Yuqian Li <liyuqian@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Yuqian Li <liyuqian@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
1 file changed