Reduce memory leaks maybe?
This commit is contained in:
4
external/parallel-rdp/ParallelRDPWrapper.cpp
vendored
4
external/parallel-rdp/ParallelRDPWrapper.cpp
vendored
@@ -21,7 +21,7 @@ void ParallelRDP::SetFramerateUnlocked(bool unlocked) {
|
||||
Program* fullscreen_quad_program;
|
||||
|
||||
void ParallelRDP::LoadWSIPlatform(Vulkan::InstanceFactory* instanceFactory, std::unique_ptr<Vulkan::WSIPlatform>&& wsi_platform, std::unique_ptr<ParallelRDP::WindowInfo>&& newWindowInfo) {
|
||||
wsi = new WSI();
|
||||
wsi = std::make_unique<WSI>();
|
||||
wsi->set_backbuffer_srgb(false);
|
||||
wsi->set_platform(wsi_platform.get());
|
||||
wsi->set_present_mode(PresentMode::SyncToVBlank);
|
||||
@@ -72,7 +72,7 @@ void ParallelRDP::Init(Vulkan::InstanceFactory* factory, std::unique_ptr<Vulkan:
|
||||
|
||||
CommandProcessorFlags flags = 0;
|
||||
|
||||
command_processor = new CommandProcessor(wsi->get_device(), reinterpret_cast<void*>(aligned_rdram),
|
||||
command_processor = std::make_unique<CommandProcessor>(wsi->get_device(), reinterpret_cast<void*>(aligned_rdram),
|
||||
offset, 8 * 1024 * 1024, 4 * 1024 * 1024, flags);
|
||||
|
||||
if (!command_processor->device_is_supported()) {
|
||||
|
||||
8
external/parallel-rdp/ParallelRDPWrapper.hpp
vendored
8
external/parallel-rdp/ParallelRDPWrapper.hpp
vendored
@@ -17,10 +17,6 @@ public:
|
||||
|
||||
void Init(Vulkan::InstanceFactory*, std::unique_ptr<Vulkan::WSIPlatform>&&, std::unique_ptr<WindowInfo>&&, const u8*);
|
||||
ParallelRDP() = default;
|
||||
~ParallelRDP() {
|
||||
delete wsi;
|
||||
delete command_processor;
|
||||
}
|
||||
|
||||
void UpdateScreen(n64::VI&, bool = false);
|
||||
void EnqueueCommand(int, u32*);
|
||||
@@ -32,7 +28,7 @@ private:
|
||||
void DrawFullscreenTexturedQuad(Util::IntrusivePtr<Vulkan::Image>, Util::IntrusivePtr<Vulkan::CommandBuffer>);
|
||||
void UpdateScreen(Util::IntrusivePtr<Vulkan::Image>);
|
||||
|
||||
Vulkan::WSI* wsi = nullptr;
|
||||
RDP::CommandProcessor* command_processor;
|
||||
std::unique_ptr<Vulkan::WSI> wsi;
|
||||
std::unique_ptr<RDP::CommandProcessor> command_processor;
|
||||
std::unique_ptr<WindowInfo> windowInfo;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user