Bug 312169 (MONO41167) - Regression test-53 fails on Linux.
Summary: Regression test-53 fails on Linux.
Status: RESOLVED MOVED
Alias: MONO41167
Product: Mono: Runtime
Classification: Mono
Component: misc (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Mono Bugs
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-11 06:37 UTC by Miguel de Icaza
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 18:08:26 UTC


---- Reported by miguel@ximian.com 2003-04-10 23:37:30 MST ----

The following test fails with Mono/Mini, the "finally" clause of a using
statement is not executed when an exception is thrown.

using System;

class MyDispose : IDisposable {
	public bool disposed;
	
	public void Dispose ()
	{
		disposed = true;
	}
}

class M {
	static int Main ()
	{
		//
		// See if the variable `c' is disposed if there is
		// an error thrown inside the using block.
		//
		MyDispose copy_c = null;
		try {
			using (MyDispose c = new MyDispose ()){
				copy_c = c;
				throw new Exception ();
			}
		} catch {}

		if (!copy_c.disposed)
			Console.WriteLine ("C was not dispossed");
		else
			Console.WriteLine ("Disposal on finally block works");

		return 0;
	}
}



---- Additional Comments From lupus@ximian.com 2003-04-15 13:24:54 MST ----



*** This bug has been marked as a duplicate of https://bugzilla.novell.com/show_bug.cgi?id=MONO41166 ***


Unknown operating system unknown. Setting to default OS "Other".
This bug was marked DUPLICATE in the database it was moved from.
    Changing resolution to "MOVED"