I've just bought a DHT22 sensor to connect to my RPi but most tutorials mention there should be a resistor connected between the sensor and the GPIO pin. Is this necessary? Will it work without or will I end up melting something?
The short answer is yes. The pull up resistor ensures a valid logic level when the pins are switching from input to output, you won't melt anything but it may not function correctly. so you should add a 4.7K - 10KΩ resistor between the Data pin and the VCC pin.
This tutorial froim Adafruit has a schematic and some info on logging your data.
It seems necessary for reliable readings. I started my project without pull up resistor and the humidity measurement started dropping down. It may start correctly but deterioate later. Since I was using pigpio module, I enabled internal pull up resistor as below:
The gpio refers to your data pin.
I use a 10K pull-up from pin 2 (DATA) to pin 1 (VCC), and always use 3V3 to pin 1.
On 5V the sensor heats up a few degrees celsius. Also, pay attention to nearby heatsources (laptop, your breath, power supplies) when testing/calibrating the sensor.