[Service] Fix memory leak of parentPort 28/264328/1
authorDongHyun Song <dh81.song@samsung.com>
Thu, 16 Sep 2021 05:02:13 +0000 (14:02 +0900)
committerDongHyun Song <dh81.song@samsung.com>
Thu, 16 Sep 2021 05:17:46 +0000 (14:17 +0900)
commitc0be4dff8cb45cf1c9e058eb7812b07a6714ce29
tree7a5e0188a641872f6bedf5a70f3edbd472785e05
parenteadcbd422b27a662e2412ea5706f8ab1b31d3a47
[Service] Fix memory leak of parentPort

From an againg test, which repeatedly launch/terminate an empty
service app, we can find that memory size is continuously
increasing.

With checking service_runner.ts line by line, I figure out that
parentPort (MessagePort) is related to memory leak.

parentPort.close() can be effective to make memory usage stable
a little.

Change-Id: Ia5737915507452100e729246e8f658715d603e81
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
wrt_app/service/service_runner.ts