With regard to the power of hefker we find that Rabbi Shimon ben Yehotzadak rules that it will only take effect if it is done before three people. Rabbi Yehoshua ben Levi rules that on a Torah level declaring an object to be ownerless will work even before one person; the Sages ruled that three people are necessary, so that one can take possession and the other two can act as witnesses.
The Gemara does not discuss a case where a person – in the privacy of his own home – declares that he no longer wants to own an object, and there is no one there to witness the statement. According to the Rambam this cannot possibly work. After all, Rabbi Yehoshua ben Levi’s statement appears to require at least one person, and if no one knows of it, what meaning can a statement of hefker have? Nevertheless, Tosafot, the Rosh and the Meiri all believe that hefker will work even if it was made privately with no witnesses.
The difficulty with Rabbi Yehoshua ben Levi’s ruling that we require three at least on a Rabbinic level, is that we find many cases in the Gemara where hefker appears to be effective even without three witnesses. Even the Mishna under discussion (43a) included a case where there are only two people and one of them declares his food ownerless in order to accommodate his friend. Similarly, we find cases in hilkhot Shabbat where the recommended ruling is to declare an object to be ownerless in order to solve halakhic problems, and there is no indication that three witnesses are required.
Tosafot explain that the requirement of three is only applied to cases where a person makes his property hefker, but it does not apply to other objects.
The Ritva’s approach is that in cases of distress – such as the case in our Mishna or on Shabbat – the Sages did not apply their requirement of three, leaving the basic Biblical rule of one witness.