Skip to content

Commit

Permalink
重构:ClassRegistry使用TSharedPtr
Browse files Browse the repository at this point in the history
  • Loading branch information
forsakenyang committed May 1, 2022
1 parent 601d3c0 commit 932a8a0
Show file tree
Hide file tree
Showing 5 changed files with 233 additions and 227 deletions.
3 changes: 1 addition & 2 deletions Plugins/UnLua/Source/UnLua/Private/LuaEnv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ namespace UnLua

UELib::Open(L);
ObjectRegistry = MakeShared<FObjectRegistry>(this);
ClassRegistry = new FClassRegistry(L);
ClassRegistry = MakeShared<FClassRegistry>(this);
ClassRegistry->Register("UObject");
ClassRegistry->Register("UClass");

Expand Down Expand Up @@ -140,7 +140,6 @@ namespace UnLua
Manager->RemoveFromRoot();
Manager = nullptr;

delete ClassRegistry;
delete ContainerRegistry;
delete EnumRegistry;

Expand Down
Loading

0 comments on commit 932a8a0

Please sign in to comment.