DO HEKDESH OR ANIYIM ACQUIRE DAVAR SHE'LO BA L'OLAM? [Davar she'Lo Ba l'Olam: Hekdesh]
Gemara
6b: Reuven and Shimon were fighting over a bathhouse. Each said 'it is mine.' Reuven declared it Hekdesh.
7a (R. Chiya bar Avin): If one was Makdish property that he cannot obtain through Beis Din, it is not Hekdesh.
Inference: If he can obtain it through Beis Din, he can make it Hekdesh, even before receiving it.
Question: R. Yochanan taught that if property was stolen and the owner did not despair, neither the owner nor the thief can make it Hekdesh;
The thief cannot, because it is not his. The owner cannot, because it is not in his domain (even though he can obtain it through Beis Din)!
Answer: The bathhouse is not movable, rather, it is land. If one can obtain land through Beis Din, it is as if it is in his domain.
9b (Mishnah - R. Eliezer): If Levi gathered Pe'ah and said 'this is for Ploni the Oni', he acquired for him;
Chachamim say, he must give it to the first poor person he finds.
(Rav Nachman): They argue about when Levi is poor. R. Eliezer holds that Migo (since) Levi could acquire it for himself, he may acquire it for another Oni. Chachamim disagree with the Migo.
Bava Kama 36b: A man hit Reuven. Rav Yosef ruled that he receives a half-Dinar. Reuven did not want it, and said 'give it to the poor'. He later retracted and asked 'give it to me. I will use it to make myself healthy.'
Rav Yosef: You cannot retract, for the poor already acquired it. Even though there are not poor people here, we are a Yad (power of acquisition) on behalf of poor people elsewhere.
Rosh Hashanah 6a: "B'Ficha" teaches that Bal Te'acher (the Isur to delay bringing Korbanos) applies to Tzedakah.
Rishonim
Rif (Bava Kama 18b): Rav Yosef meant 'Aniyim are no less than others. Even though there are not Aniyim here, we are Yad Aniyim to acquire for them through Ma'amad Sheloshtam (a special Kinyan in which David tells Levi, in front of Moshe, 'give the money you have of mine to Moshe'). If one said about money in his possession 'it is for Aniyim', they acquire immediately, due to "b'Ficha".
Rosh (Bava Kama 4:3): "B'Ficha" does not teach that his Dibur obligates him, for one cannot be Makdish or give to Tzedakah a Davar she'Lo Ba l'Olam.
Rambam (Hilchos Mechirah 22:15): The law of Hekdesh, Aniyim and Nedarim is unlike that of regular people. If one said 'all offspring of my animal will be Hekdesh to Bedek ha'Bayis' or 'forbidden to me' or 'for Tzedakah', even though it does not become Kodesh because it is Lo Ba l'Olam, he is obligated to keep his word, due to "k'Chol ha'Yotzei mi'Piv Ya'aseh."
Rambam (16): Therefore, if a Shechiv Mera commanded 'give to Aniyim all produce of my tree' or 'all rental of this house', the poor acquired them.
Question (Maharit 2 CM 50): His vow does not obligate his heirs! We do not force heirs to pay their father's debt from property other than land (Kesuvos 91b)! One who took usury must return it due to "V'Chai Achicha Imach", but heirs need not return it (Bava Metzia 62a)!
Answer (Maharit): It is a special law of Matanas Shechiv Mera that the Aniyim acquire, since he himself would be obligated due to his vow. Alternatively, it is a Mitzvah to fulfill the words of the deceased. Normally, this is only if he gave the money to a third party. Here is different, for he himself could not have retracted had he lived, for he must fulfill his vow.
Rambam (17): Some Ge'onim disagree and say that Aniyim acquire like all other people, therefore they do not acquire Davar she'Lo Ba l'Olam. I disagree. One is not commanded to make Kiyanim, but he is commanded to fulfill his words to Tzedakah or Hekdesh, just like he must fulfill a vow.
Ra'avad: The Rif said that one can be Makneh a Davar she'Lo Ba l'Olam to Aniyim through Ma'amad Sheloshtam. The Rambam says that Aniyim acquire it (even without Ma'amad Sheloshtam)! I say that if he said 'I will give', he obligated himself and he must give. If he said that it 'will be given', or he commanded his sons to give, the Aniyim did not acquire, like the Rif says.
Magid Mishneh: All agree that one cannot be Makdish Davar she'Lo Ba l'Olam. The Rambam merely says that he must fulfill his vow.
Kesef Mishneh: The Rambam agrees that Aniyim do not acquire a Davar she'Lo Ba l'Olam. He teaches that if one said 'the fruits of this tree are to Aniyim', they did not acquire. If he said 'I will give', he vowed and he must fulfill his vow.
Question: Why do his words obligate his children? They did not vow!
Answer #1 (Kesef Mishneh): Perhaps because his heirs heard and did not protest, they accepted his words and it is as if they themselves vowed.
Answer #2 (SMA CM 212:19): It is as if he gave the house or tree to Aniyim until they receive all the rental or fruits. His children do not inherit until they fulfill the vow.
Rambam (Hilchos Erchin 6:31): One cannot be Makdish a Davar she'Lo Ba l'Olam, but if he said 'it is upon me to be Makdish it', he must fulfill his vow. If he did not, he transgressed "Lo Te'acher" and "Lo Yachel" and "K'Chol ha'Yotzei mi'Piv Ya'aseh", like other vows.
Poskim
Shulchan Aruch (CM 212:7): The law of Hekdesh, Aniyim and Nedarim is unlike that of regular people. If one said 'all offspring of my animal will be Hekdesh to Bedek ha'Bayis' or 'forbidden to me' or 'for Tzedakah', even though it does not become Kodesh because it is Lo Ba l'Olam, he must keep his word, due to "k'Chol ha'Yotzei mi'Piv Ya'aseh." Therefore, if a Shechiv Mera said 'give to Aniyim all produce of my tree or all rental of this house', the poor acquired them.
Beis Yosef (DH v'Chosav Od): The Tur says that the Rosh holds like the Ge'onim who argue with the Rambam. There is no Kinyan on Davar she'Lo Ba l'Olam, just he must fulfill his vow. Really, the Rambam holds like the Rosh. The Ge'onim say that since there is no Kinyan, there is no vow.
SMA (18): The Tur says that the Rambam obligates even when he said 'give', and in this case the Rosh argues. All agree that if he said 'I will give', this is a vow and he must fulfill it.
Gra (20): We find many who vowed about what they will receive. Yakov vowed to tithe what he will get, Yisrael vowed that if they within the war, they will make the cities Cherem (Bamidbar 21:2), and Chanah vowed that if she will have a son, she will give him to (serve) Hash-m.
Ketzos ha'Choshen (4): The Mishnah in Pe'ah (4:9) supports the Rambam. If one collected Pe'ah and said 'it is for Ploni the Oni', Chachamim say that he gives it to the first Oni he finds. This is when Levi is poor. Chachamim do not say Migo (since) Levi could acquire it for himself, he can acquire it for another Oni. Why must he give it to the first Oni he finds? According to the Rambam, it is due to his vow. Perhaps the Rosh holds like he says in Nedarim (34b DH Lehorisho), that one can be Makdish a Hefker loaf if no one else is near it. It is not Davar she'Lo Ba l'Olam, for he could acquire it himself. Such a vow takes effect only if he acquires it in the end. Therefore, he cannot keep the Pe'ah himself, lest his vow take effect.
Note: This does not explain why he must give it to the first Oni. Perhaps this is a decree, lest he wait for a particular Oni and come to acquire it for himself.