Oh God, this has weird complexities. Apparently LSRelease() only releases per license unit resources and the license handle and associated context is released separately with LSFreeHandle(). I guess it makes sense if you need to keep track of every license individually (e.g. a CAL) and mid-operation one of the CALs expires...