summaryrefslogtreecommitdiff
path: root/libs/androidfw/AssetManager.cpp
diff options
context:
space:
mode:
author Mateus Azis <azis@google.com> 2023-04-18 17:07:00 -0700
committer Mateus Azis <azis@google.com> 2023-04-18 17:09:55 -0700
commit75eb42b914ed228c20f3b8af97ee452e1dcc9e2e (patch)
tree3b931439855d592a6dda71751761ff3660876620 /libs/androidfw/AssetManager.cpp
parenta1355bc271fb4c20f879f5c75921c4f6f82a793b (diff)
Use try-with-resources to avoid accidentaly leaking unclosed objects.
Try-with-resources guarantees that objects will be closed even if an exception happens after their creation. It also handles nulls and avoids throwing NPE. Test: built and launched Cuttlefish. Change-Id: I80e767d1fbbca25a724bfe94e1752f88891a6bb0
Diffstat (limited to 'libs/androidfw/AssetManager.cpp')
0 files changed, 0 insertions, 0 deletions