Skip to content

Commit

Permalink
.NET: Fix GC pressure from proxies
Browse files Browse the repository at this point in the history
  • Loading branch information
praydog committed May 13, 2024
1 parent ac74326 commit 9f4556f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions csharp-api/REFrameworkNET/NativeObject.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ public ref class NativeObject : public REFrameworkNET::UnifiedObject
return gcnew NativeObject(obj, t);
}

virtual void AddProxy(System::Type^ type, IProxy^ proxy) override {
// Nothing, don't bother
}

protected:
void* m_object{};
TypeDefinition^ m_type{};
Expand Down
4 changes: 4 additions & 0 deletions csharp-api/REFrameworkNET/ValueType.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ public ref class ValueType : public UnifiedObject {
return (uintptr_t)Ptr();
}

virtual void AddProxy(System::Type^ type, IProxy^ proxy) override {
// Nothing, don't bother
}

generic <typename T>
virtual T As() override;

Expand Down

0 comments on commit 9f4556f

Please sign in to comment.