This action was brought in equity for an accounting. The defendant, a nonresident, was arrested pursuant to an order granted by the court under section 550 of the Code of Civil Procedure, and, in lieu of an undertaking, deposited with the sheriff $500 as bail. The trial of the action resulted in a' dismissal of the complaint on the merits. From the judgment entered tin such dismissal, the plaintiff has appealed, and has filed ah undertaking staying execution.
The defendant now moves for an order directing the return of his deposit, claiming that upon the entry of judgment dismissing the complaint he became entitled to the restitution of the 'money. Section 550 of the Code of Civil Procedure provides that:
“A defendant may also be arrested in action wherein the judgment demanded requires the performance of an. act the neglect or refusal to perform which would be punishable by the court, as a contempt, where the defendant is not a resident of the state, or being a resident, is about to depart therefrom by reason of which nonresidence or departure there is danger that a judgment or an order requiring the performance of the act will be rendered ineffectual.”
In a case specified in that section an order of arrest can be granted only by the court, arid is always in its discretion. Section 551. A defendant may give bail, either by delivering to the sheriff a written undertaking to the effect that he will obey the direction of the court or of an appellate court 'requiring him to perform a specified act, or, in default of so doing, that he will at all times render himself amenable to proceedings to punish him for the omission (section 575); or, in lieu of such undertaking, he may deposit the required sum (section 582). The disposition of the deposit is governed by section 585, which provides that in a case where, as here, the order of arrest could he granted only by the court, the deposit is “subject to the direction of the court, as justice requires, before and after the judgment.” The purpose of this provision is to enable the court to extend to the plaintiff the same protection where a deposit has been made that he would enjoy had an undertaking been given. I cannot subscribe to the rule stated in Wilson v. Ryder, 13 Civ. Proc. R. 69, that the original judgment, if in favor of the defendant, releases the deposit, for the reason that the Code specifically provides for such release only where the final judgment is for the defendant. But, assuming the rule as stated in that case tti be sound, it could avail only in actions *840at law, and not in equitable actions, where the disposition of a deposit rests entirely in the discretion of the court. The vesting of such discretion carries with it the incidental powers necessary to its exercise, and it is for the court to direct both before and after judgment what disposition shall be made of the deposit. Under the circumstances of this case, justice requires the retention of the deposit until final judgment is rendered.
Motion denied. Settle order on notice.