
485 A.2d 192 (1984)
Abigail C. TEMPLE, Appellant,
v.
THOMAS D. WALSH, INC., Appellee.
No. 83-1259.
District of Columbia Court of Appeals.
Submitted September 25, 1984.
Decided December 10, 1984.
Lawrence E. Williams, Jr., Washington, D.C., was on the brief, for appellant.
No brief was filed by appellee. Margaret Mann Drachsler and Charles H. Acker, Washington, D.C., entered appearances, for appellee.
Before NEBEKER and TERRY, Associate Judges, and GALLAGHER, Associate Judge, Retired.
TERRY, Associate Judge:
In this landlord-and-tenant proceeding, the tenant appeals from the trial court's order releasing to her landlord the funds she had deposited in the court registry, pursuant to a protective order, during the pendency of the landlord's action for possession. We find her arguments unpersuasive and affirm the court's order.
*193 In September 1982 the landlord sued the tenant for possession of a dwelling. In its complaint the landlord alleged that the tenant had "fail[ed] to vacate after expiration of thirty day notice to quit due to housing code violations caused by tenant." The tenant defended on three grounds: (1) that she did not receive a valid notice to quit, (2) that the landlord had accepted rent after submitting the disputed notice to quit, and (3) that the suit was retaliatory. The court subsequently entered a protective order requiring the tenant to deposit each month into the registry a sum equal to her monthly rent ($220.00) pending disposition of the action for possession.
Seven months later the tenant filed a motion to dismiss the action on the ground that the landlord had failed to serve a valid notice to vacate and a notice to cure, as required by D.C. Code § 45-1561 (1981). The landlord did not oppose the motion, and it was promptly granted. Each party then moved for release of the funds which the tenant had deposited into the registry of the court pursuant to the protective order.
The court held a hearing to determine the proper distribution of the funds. At the hearing, the tenant argued that she was entitled to all of the funds in the court registry because the landlord's action for possession had been dismissed. The landlord, on the other hand, maintained that it was entitled to the funds because the tenant had had full use of the property while the action for possession was pending. The court found that the tenant had "received the benefit of housing while litigating the issue of possession." After noting that the tenant had failed to offer any evidenceor even to raise any issuethat might warrant a reduction in her rent, the court ordered the funds released to the landlord.
On appeal the tenant renews her contention that the court was required, upon dismissal of the landlord's action for possession, to vacate the protective order and return all the money she had deposited in the court registry to her. We disagree.
A protective order is a device used by the courts to preserve the status quo pending the resolution of landlord-tenant disputes. E.g., Davis v. Rental Associates, Inc., 456 A.2d 820, 829 (D.C.1983) (en banc) (plurality opinion). It is designed to protect both parties. It assures the landlord that any rent due under the lease will in fact be paid, albeit into the court registry for the time being, id. at 830, and it assures the tenant who successfully defends a suit that he will not have to forfeit his lease "because [he] cannot make up an unpaid deficiency." Dameron v. Capitol House Associates Limited Partnership, 431 A.2d 580, 584 (D.C.1981). It also "provides a fund from which the tenant may receive an abatement if housing code violations warranting an abatement are ... found." Id. After the underlying action is disposed of, however, the court has an obligation, irrespective of the outcome of that action, to distribute in an equitable fashion any funds deposited in the court registry pursuant to the protective order.
Once the money came into the court's control by being deposited in the registry, the court had an independent duty to ensure that it was properly distributed. Its performance of that duty could not be affected by any act or omission of either party.
Goodwin v. Barnes, 456 A.2d 1246, 1248 n.1 (D.C.1983).
In this case the trial court, upon dismissal of the landlord's action for possession, held a hearing to determine the respective rights of the parties, as required by McNeal v. Habib, 346 A.2d 508 (D.C.1975). At the conclusion of the hearing, the court found that the tenant had "received the benefit of housing while litigating the issue of possession." The tenant does not dispute this finding, but contends that her use of the landlord's property and the rent she may have owed were irrelevant to the issue before the court. Her contention appears to be based on the fact that the landlord's action was dismissed on her motion and was, in any event, an action for possession *194 only and not for rent due and owing. However, as we held in Smith v. Interstate General Corp., 462 A.2d 1133, 1134 (D.C. 1983), the disbursement of the funds in the registry is "the concluding stage of a separate and distinct equitable proceeding, not part of the underlying possessory action." Hence the fact that the landlord's action had been dismissed was immaterial, as was the fact that it was merely for possession and not for rent. There can be no doubt that the landlord had a right to be compensated in some measure for the tenant's use and enjoyment of his property. See Nicholas v. Howard, 459 A.2d 1039, 1041 (D.C. 1983); Dameron v. Capitol House Associates Limited Partnership, supra, 431 A.2d at 584. The fact that the tenant remained in possession of the property at all times and the amount of rent which the lease required her to pay for it were highly relevant to the only issue before the court in the McNeal hearing, which was how to distribute equitably the funds in the registry.
Thus we hold that a disposition favorable to the tenant in the underlying landlord-tenant action does not preclude the trial court, in a McNeal hearing, from releasing to the landlord any funds which the tenant may have deposited into the registry of the court. The disbursement of those funds often depends on factors not at issue (or not resolved) in the underlying action, particularly the presence or absence of housing code violations which might entitle the tenant to a reduction in rent. See McNeal v. Habib, supra, 346 A.2d at 514. Given the court's uncontested finding here that, while the possessory action was pending, the tenant had "received the benefit of housing" in the very premises that were the subject of the litigation, and given the tenant's failure to offer any evidence which would warrant a reduction in the amount of rent due under her lease, we conclude that the trial court acted well within its discretion as a court of equity in releasing the funds in the registry to the landlord.
Affirmed.
