I recently bought a Pi 3 and was playing with the GPIO pins to power some LEDs when I noticed that a particular pin was staying on after the program exited. It persisted even after the Pi was turned off (but still plugged in). However, if the pin is initialized within a program, it turns off completely again until exited. I tested this with both Ruby's PiPiper and Python's RPi.GPIO.
What causes this? Is there a way to 'fix' it?
I've noticed this with Pins 3, 5, 7, and slightly with 10. Also, it appears Pin 8 - GPIO14 doesn't actually function as GPIO but rather a 3V3 or 5V source despite being listed as GPIO.