From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-x22a.google.com (mail-lf0-x22a.google.com [IPv6:2a00:1450:4010:c07::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 2A8208044A for ; Thu, 23 Mar 2017 23:22:37 -0700 (PDT) Received: by mail-lf0-x22a.google.com with SMTP id j90so1815589lfk.2 for ; Thu, 23 Mar 2017 23:22:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=DxnTaTBfWUU7ZDuu6xxBpOD9S4bW7elAJshpJrMrin8=; b=WKnXM5A+1rZT2t66iOr9o0iYhEFD+az2TpvV5GBfbC2f1QTbYail4dW0aACNmNEjsm FhRNalKr3knl2krcBuaFatDM/gzPspyOzyo2VljrQ8Jb4EWXcpQ9YSHMZe5/upnAw6BM 3MB03KVWY/KVr9D4JlHV0hcmYMg9lB5excrqCa4HTGfaNNzE3t2dCZhTStzl+d06ebPx cHE11Vg8WK37RU5zmB1/hfefcT/xOpD1nrK+sfHjscwDbNUS7k70aEt/7xFYwALRitQC AymodW7MwQyQqIId/+mYMyA6wy82Yd2XqpkxL359nIg7W1uw+cWGXVHTdkfjGwJu9J59 14aQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=DxnTaTBfWUU7ZDuu6xxBpOD9S4bW7elAJshpJrMrin8=; b=LEWilUe5WURpnDJihqOzg/+rRUgJneeQ7tJIAEtc9Ij/ZhmDXp+qwTwTClhbfE0PQq zbZ62IHOSzPsd40WgND3Jki0Vuv35p9I49qpCptoP42SKWlj68/UgGRTHfhklltNqn74 oX/w60xGqe83btYSZCtLFcGwO0hMEimd6VsaksV5GUNB6AYv/X/wHIAXyxhjDYdMimuk 6BAQSZSvH0qvYES4JK18e8TLs6qSTRLcAuQGV8Njd6UmL6VEjiOneXeLND5jrXHH+1iD nVRUlvVX9C5ycU7/H5w9iu99aAtmg2BW05tsGWqZljVcpRuyTJ3Cyucj2l+3tRXKB7M5 h6gg== X-Gm-Message-State: AFeK/H14T3RUQ67mRjRFJGwj/22g7GMC+Q9s+ZV8F27fk6l1t1v1SluFc9mKNAiTrsI4EdViKScSe5T2dnasgA== X-Received: by 10.25.198.19 with SMTP id w19mr3440574lff.175.1490336554951; Thu, 23 Mar 2017 23:22:34 -0700 (PDT) MIME-Version: 1.0 Received: by 10.25.72.213 with HTTP; Thu, 23 Mar 2017 23:22:34 -0700 (PDT) From: Arka Sharma Date: Fri, 24 Mar 2017 11:52:34 +0530 Message-ID: To: edk2-devel@lists.01.org Subject: Closing events and releasing resources in notify function X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Mar 2017 06:22:37 -0000 Content-Type: text/plain; charset=UTF-8 Hi, Is it ok to close the event and release the resource allocated to be sent as context inside the notify function. May be something like this VOID EFIAPI NotifyRoutine ( EFI_EVENT Event, VOID *Context ) { // // Perform intended task // FreePool (Context); gBS->CloseEvent (Event); } In the above example Context was allocated before creating the event and passed as a parameter to CreateEvent(). Regards, Arka