mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-13 15:16:16 +00:00
Add scoped autoreleasepool to tests and examples
This ensures ObjC objects do not leak. On non-Apple platforms, the scope does nothing. Fixed: dawn:546 Change-Id: Id43702e6536bf9cb37825a5449511e10cf0734f5 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/55841 Commit-Queue: Austin Eng <enga@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include "SampleUtils.h"
|
||||
|
||||
#include "utils/ComboRenderPipelineDescriptor.h"
|
||||
#include "utils/ScopedAutoreleasePool.h"
|
||||
#include "utils/SystemUtils.h"
|
||||
#include "utils/WGPUHelpers.h"
|
||||
|
||||
@@ -324,6 +325,7 @@ int main(int argc, const char* argv[]) {
|
||||
init();
|
||||
|
||||
while (!ShouldQuit()) {
|
||||
utils::ScopedAutoreleasePool pool;
|
||||
frame();
|
||||
utils::USleep(16000);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user