Do not destroy session in srw destructor, its lifetime is different. Do not destroy ctx in ~srw(), its lifetime is longer.
v2.24.7.9