diff options
| author | kat <kat@vector35.com> | 2024-10-28 11:58:15 -0400 |
|---|---|---|
| committer | kat <kat@vector35.com> | 2024-10-28 12:58:51 -0400 |
| commit | 07bce5f257d30061475452ec9c2e06a132747b54 (patch) | |
| tree | 434dbd4660b981edd81c3f1651e868aacb240b26 /view/sharedcache/ui/SharedCacheUINotifications.cpp | |
| parent | 891b8c0d4366266c0b9af08037dbd71c54cf86b3 (diff) | |
[SharedCache] Fix UI causing BV leaks
Diffstat (limited to 'view/sharedcache/ui/SharedCacheUINotifications.cpp')
| -rw-r--r-- | view/sharedcache/ui/SharedCacheUINotifications.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/view/sharedcache/ui/SharedCacheUINotifications.cpp b/view/sharedcache/ui/SharedCacheUINotifications.cpp index 6c64c9ef..6979bac3 100644 --- a/view/sharedcache/ui/SharedCacheUINotifications.cpp +++ b/view/sharedcache/ui/SharedCacheUINotifications.cpp @@ -48,11 +48,11 @@ void UINotifications::OnViewChange(UIContext* context, ViewFrame* frame, const Q if (!ah->isBoundAction("Load Image by Name")) { ah->bindAction("Load Image by Name", UIAction([view = view](const UIActionContext& ctx) { - SharedCacheAPI::SCRef<SharedCacheAPI::SharedCache> cache = new SharedCacheAPI::SharedCache(view); + Ref<SharedCacheAPI::SharedCache> cache = new SharedCacheAPI::SharedCache(view); DisplayDSCPicker(ctx.context, view); })); ah->bindAction("Load Section by Address", UIAction([view = view](const UIActionContext& ctx) { - SharedCacheAPI::SCRef<SharedCacheAPI::SharedCache> cache = new SharedCacheAPI::SharedCache(ctx.binaryView); + Ref<SharedCacheAPI::SharedCache> cache = new SharedCacheAPI::SharedCache(ctx.binaryView); uint64_t addr = 0; bool gotAddr = GetAddressInput(addr, "Address", "Address"); if (gotAddr) @@ -67,7 +67,7 @@ void UINotifications::OnViewChange(UIContext* context, ViewFrame* frame, const Q UIAction( [](const UIActionContext& ctx) { Ref<BinaryView> view = ctx.binaryView; - SharedCacheAPI::SCRef<SharedCacheAPI::SharedCache> cache = new SharedCacheAPI::SharedCache(ctx.binaryView); + Ref<SharedCacheAPI::SharedCache> cache = new SharedCacheAPI::SharedCache(ctx.binaryView); uint64_t addr = ctx.token.token.value; if (addr) { @@ -78,7 +78,7 @@ void UINotifications::OnViewChange(UIContext* context, ViewFrame* frame, const Q } }, [](const UIActionContext& ctx) { - SharedCacheAPI::SCRef<SharedCacheAPI::SharedCache> cache = new SharedCacheAPI::SharedCache(ctx.binaryView); + Ref<SharedCacheAPI::SharedCache> cache = new SharedCacheAPI::SharedCache(ctx.binaryView); uint64_t addr = ctx.token.token.value; if (isAddrMapped(ctx.binaryView, addr)) return false; @@ -88,7 +88,7 @@ void UINotifications::OnViewChange(UIContext* context, ViewFrame* frame, const Q UIAction( [](const UIActionContext& ctx) { Ref<BinaryView> view = ctx.binaryView; - SharedCacheAPI::SCRef<SharedCacheAPI::SharedCache> cache = new SharedCacheAPI::SharedCache(view); + Ref<SharedCacheAPI::SharedCache> cache = new SharedCacheAPI::SharedCache(view); uint64_t addr = ctx.token.token.value; if (addr) { @@ -99,21 +99,21 @@ void UINotifications::OnViewChange(UIContext* context, ViewFrame* frame, const Q } }, [](const UIActionContext& ctx) { - SharedCacheAPI::SCRef<SharedCacheAPI::SharedCache> cache = new SharedCacheAPI::SharedCache(ctx.binaryView); + Ref<SharedCacheAPI::SharedCache> cache = new SharedCacheAPI::SharedCache(ctx.binaryView); uint64_t addr = ctx.token.token.value; if (isAddrMapped(ctx.binaryView, addr)) return false; return addr && cache->GetImageNameForAddress(addr) != ""; // bool })); ah->setActionDisplayName("Load ADDRHERE", [](const UIActionContext& ctx) { - SharedCacheAPI::SCRef<SharedCacheAPI::SharedCache> cache = new SharedCacheAPI::SharedCache(ctx.binaryView); + Ref<SharedCacheAPI::SharedCache> cache = new SharedCacheAPI::SharedCache(ctx.binaryView); uint64_t addr = ctx.token.token.value; if (addr) return QString("Load ") + cache->GetNameForAddress(addr).c_str(); return QString("Error"); }); ah->setActionDisplayName("Load IMGHERE", [](const UIActionContext& ctx) { - SharedCacheAPI::SCRef<SharedCacheAPI::SharedCache> cache = new SharedCacheAPI::SharedCache(ctx.binaryView); + Ref<SharedCacheAPI::SharedCache> cache = new SharedCacheAPI::SharedCache(ctx.binaryView); uint64_t addr = ctx.token.token.value; if (addr) return QString("Load ") + cache->GetImageNameForAddress(addr).c_str(); |
