This is how I have strung my guitar since I was a teenager.

I started learning to play guitar when I was 12 years old. There was a mechanic who worked with my dad who was in a local band, and he took and interest in my endeavours giving me lessons in the form of “jamming” either at our home or his. As a guitarist, I owe a lot to him and his generosity. He taught me simple tunes like Wildwood Flower and provided me with the basics of chord theory, him playing his Gibson 335 and me on my cheap Pan acoustic. But he also showed me this string locking technique when changing strings on my guitar, and I have used this method ever since. Never had a problem with tuning because of string slippage on the peg!