Modern head units need two power supplys.
A constant live for station memory, setting, etc. Usually a YELLOW wire from the back of the head unit, pulls very little power.
And a switched live to power the head unit, RED wire from the back of the head unit, this should only pull power when the ignition is on.
There are many posts on this as the red wire in the cars loom (those wires you can see in the whole) isn't switched, so if you connect up the RED (switched) wire from the head unit to it, it will work with the ignition switched off and will pull power when it's parked up and flatten the battery.
I had this myself with buying a car with a new head unit already fitting and after 3 days the battery was dead.
With it connected like this, the amps drawn from the battery were 0.48 with the ignition. lights, alarm etc, all off. I removed the head unit and it dropped to 0.03 amps (the clock ticking)
You'll need to find a switched live for the head units RED wire, you'll find one under the gear levers plastic base trim, to the front and left of where the gear lever goes into the floor. There is a multi connector with around 10 wires running through it, the one you need is the ORANGE wire, just scotch lock into it, make sure the ignition if off first!
The head units YELLOW wire can go to the RED wire in cars loom, the one you see in the hole as it's constant.
I hope this makes sense.