You didn't mention how the smoke detector was misbehaving. Is it trying to tell you there is a fire when you know there isn't? Or, is it begging for a new battery and then not happy when it gets one?
First, and perhaps most important: It might be time to replace the thing. If you're not the owner then it might be something you ask the landlord about. If it is wired into the house wiring, proceed with extreme caution, maybe get an electrician--you don't want to cause a real fire.
If it is not wired into the house wiring, and it is sounding the alarm for a fire, and you know--really know--it is wrong, you can silence it by removing the battery. (But then you don't have any smoke detector! That is not good...see "replacing", above! Quickly.)
If it is just crying for a new battery. (Periodic annoying chirp.) Then, try a new battery? If replacing the battery didn't help are you sure the replacement battery was OK?
One thing to check first, though, open it up and see if there is dust or something in there. I once "fixed" a smoke detector by evicting a spider that had taken up residence in it.
Oh. If, by coincidence, this happened when you overcooked something...open a window.
_________________
When diagnosed I bought champagne!
I finally knew why people were strange.