public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* Closing events and releasing resources in notify function
@ 2017-03-24  6:22 Arka Sharma
  2017-03-24  6:37 ` Andrew Fish
  0 siblings, 1 reply; 4+ messages in thread
From: Arka Sharma @ 2017-03-24  6:22 UTC (permalink / raw)
  To: edk2-devel

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-03-24  7:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-24  6:22 Closing events and releasing resources in notify function Arka Sharma
2017-03-24  6:37 ` Andrew Fish
2017-03-24  7:07   ` Arka Sharma
2017-03-24  7:08     ` Andrew Fish

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox