Skip to content
Prev 49080 / 63421 Next

Pointer ownership with GECreateDevDesc/GEDestroyDevDesc

This seems like the best solution (free and NULL the dev pointer in 
dev_Close(), BEFORE GEdestroyDevDesc() has a go).

I think this should be safe because dev_Close() and GEdestroyDevDesc() 
are only called in one place (so your free() should always happen before 
GEdestroyDevDesc() and your free() shouldn't happen in any other, 
potentially inappropriate, context).

Paul
On 09/23/14 03:15, Ritch Melton wrote: