Avoid big statics.

Allocating big statics when needed.

Bug: 150319735
Test: boot/works
Change-Id: I5dde4f473b38be8e8d99f034227abaedb3e50634
(cherry picked from commit c16ff2b73bca301ba47823ca9e4cbc888388ca82)
Merged-In: I5dde4f473b38be8e8d99f034227abaedb3e50634
diff --git a/VintfObject.cpp b/VintfObject.cpp
index c13dc64..913f3ca 100644
--- a/VintfObject.cpp
+++ b/VintfObject.cpp
@@ -82,8 +82,8 @@
     return propertyFetcher;
 }
 
-details::LockedSharedPtr<VintfObject> VintfObject::sInstance{};
 std::shared_ptr<VintfObject> VintfObject::GetInstance() {
+    static details::LockedSharedPtr<VintfObject> sInstance{};
     std::unique_lock<std::mutex> lock(sInstance.mutex);
     if (sInstance.object == nullptr) {
         sInstance.object = std::shared_ptr<VintfObject>(VintfObject::Builder().build().release());