I have previously observed segmentation faults during application closing. Commented out this block and segfaults gone away. I have continued work and forget to uncomment it back before pull request. Probably problem hidden somewhere else, I am not sure. Make you own decision on it.