From 2a52796c6fa93e472290774327b35616da21efba Mon Sep 17 00:00:00 2001 From: bjorn Date: Wed, 15 Jan 2020 17:56:09 -0800 Subject: [PATCH] Commenting; --- src/api/l_thread.c | 4 +--- src/modules/thread/thread.h | 3 +++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/api/l_thread.c b/src/api/l_thread.c index 867b0128..7856e14b 100644 --- a/src/api/l_thread.c +++ b/src/api/l_thread.c @@ -86,9 +86,7 @@ static int l_lovrThreadGetChannel(lua_State* L) { const char* name = luaL_checkstring(L, 1); Channel* channel = lovrThreadGetChannel(name); luax_pushtype(L, Channel, channel); - // Note: Channels are intentionally not released here - // Because the ownership of Channels is different from most objects, it is simpler to clean them - // all up in lovrThreadModuleDestroy. + // Note: Channels are intentionally not released here (see thread.h) return 1; } diff --git a/src/modules/thread/thread.h b/src/modules/thread/thread.h index 3a6599bc..da35cb08 100644 --- a/src/modules/thread/thread.h +++ b/src/modules/thread/thread.h @@ -4,6 +4,9 @@ #include #include +// Note: Channels retrieved with lovrThreadGetChannel don't need to be released. They're just all +// cleaned up when the thread module is destroyed. + #pragma once #define MAX_THREAD_ARGUMENTS 4