Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
4989beb3
Unverified
Commit
4989beb3
authored
Apr 16, 2020
by
Rémi Verschelde
Committed by
GitHub
Apr 16, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #37895 from qarmin/more_leak_fixes
Fixes leaks in ResourceCache, Vulkan and X11
parents
08464ea7
943ec798
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
1 deletion
+21
-1
resource.cpp
core/resource.cpp
+3
-0
rendering_device_vulkan.cpp
drivers/vulkan/rendering_device_vulkan.cpp
+5
-0
vulkan_context.cpp
drivers/vulkan/vulkan_context.cpp
+9
-0
display_server_x11.cpp
platform/linuxbsd/display_server_x11.cpp
+4
-1
No files found.
core/resource.cpp
View file @
4989beb3
...
@@ -477,6 +477,9 @@ void ResourceCache::clear() {
...
@@ -477,6 +477,9 @@ void ResourceCache::clear() {
resources
.
clear
();
resources
.
clear
();
memdelete
(
lock
);
memdelete
(
lock
);
#ifdef TOOLS_ENABLED
memdelete
(
path_cache_lock
);
#endif
}
}
void
ResourceCache
::
reload_externals
()
{
void
ResourceCache
::
reload_externals
()
{
...
...
drivers/vulkan/rendering_device_vulkan.cpp
View file @
4989beb3
...
@@ -7274,6 +7274,11 @@ void RenderingDeviceVulkan::finalize() {
...
@@ -7274,6 +7274,11 @@ void RenderingDeviceVulkan::finalize() {
vertex_formats
.
erase
(
temp
);
vertex_formats
.
erase
(
temp
);
}
}
for
(
int
i
=
0
;
i
<
framebuffer_formats
.
size
();
i
++
)
{
vkDestroyRenderPass
(
device
,
framebuffer_formats
[
i
].
render_pass
,
nullptr
);
}
framebuffer_formats
.
clear
();
//all these should be clear at this point
//all these should be clear at this point
ERR_FAIL_COND
(
descriptor_pools
.
size
());
ERR_FAIL_COND
(
descriptor_pools
.
size
());
ERR_FAIL_COND
(
dependency_map
.
size
());
ERR_FAIL_COND
(
dependency_map
.
size
());
...
...
drivers/vulkan/vulkan_context.cpp
View file @
4989beb3
...
@@ -1503,6 +1503,15 @@ VulkanContext::~VulkanContext() {
...
@@ -1503,6 +1503,15 @@ VulkanContext::~VulkanContext() {
if
(
queue_props
)
{
if
(
queue_props
)
{
free
(
queue_props
);
free
(
queue_props
);
}
}
for
(
uint32_t
i
=
0
;
i
<
FRAME_LAG
;
i
++
)
{
vkDestroyFence
(
device
,
fences
[
i
],
nullptr
);
vkDestroySemaphore
(
device
,
image_acquired_semaphores
[
i
],
nullptr
);
vkDestroySemaphore
(
device
,
draw_complete_semaphores
[
i
],
nullptr
);
if
(
separate_present_queue
)
{
vkDestroySemaphore
(
device
,
image_ownership_semaphores
[
i
],
nullptr
);
}
}
DestroyDebugUtilsMessengerEXT
(
inst
,
dbg_messenger
,
nullptr
);
vkDestroyDevice
(
device
,
nullptr
);
vkDestroyDevice
(
device
,
nullptr
);
vkDestroyInstance
(
inst
,
nullptr
);
vkDestroyInstance
(
inst
,
nullptr
);
}
}
platform/linuxbsd/display_server_x11.cpp
View file @
4989beb3
...
@@ -1471,8 +1471,11 @@ DisplayServer::WindowMode DisplayServerX11::window_get_mode(WindowID p_window) c
...
@@ -1471,8 +1471,11 @@ DisplayServer::WindowMode DisplayServerX11::window_get_mode(WindowID p_window) c
if
(
result
==
Success
&&
data
)
{
if
(
result
==
Success
&&
data
)
{
long
*
state
=
(
long
*
)
data
;
long
*
state
=
(
long
*
)
data
;
if
(
state
[
0
]
==
WM_IconicState
)
if
(
state
[
0
]
==
WM_IconicState
)
{
XFree
(
data
);
return
WINDOW_MODE_MINIMIZED
;
return
WINDOW_MODE_MINIMIZED
;
}
XFree
(
data
);
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment