Commit graph

10 commits

Author SHA1 Message Date
Joe Shaw
bcdd185483 2005-03-15 Joe Shaw <joeshaw@novell.com>
* mono/ProxyBuilder.cs (BuildFinalizer): Fix some invalid IL when
	generating the finalizer.  Fixes from Ben Maurer.
2005-03-15 23:30:55 +00:00
Joe Shaw
42287b94d1 2005-03-13 Joe Shaw <joeshaw@novell.com>
* mono/ProxyBuilder.cs (BuildConstructor): Decalre a local
	variable for storing our callback in.  Update the allocation
	comments.
2005-03-13 05:07:35 +00:00
Joe Shaw
2452ac5cdf 2005-03-12 Joe Shaw <joeshaw@novell.com>
* mono/ProxyBuilder.cs (BuildFinalizer): Need to load arg 0
	onto the eval stack when removing the delegate.
2005-03-13 02:05:56 +00:00
Joe Shaw
79bc662439 *** empty log message *** 2005-03-13 01:13:04 +00:00
Joe Shaw
2958e723fc 2005-03-08 Joe Shaw <joeshaw@novell.com>
Fix a bunch of lifecycle and memory management problems
	in the mono bindings.

	* mono/Arguments.cs (Arguments): Implement IDisposable

	* mono/Bus.cs (Bus): Don't allow public instantiation.  This is
	strictly a static class.

	* mono/Connection.cs: Move the DBusObjectPathVTable and associated
	delegates into this file.
	(Connection): Implement IDisposable.
	(Dispose): Disconnect the connection and set the raw connection
	pointer to IntPtr.Zero.
	(~Connection): Call Dispose().
	(RegisterObjectPath): Added.  Manages the registration of object
	paths so we can cleanly disconnect them at dispose/finalize time.
	(UnregisterObjectPath): Ditto.
	(set_RawConnection): Unregister all of the object paths when
	changing the underlying DBusConnection.  Add them back onto the
	new connection, if any.

	* mono/Handler.cs: Don't implement IDisposable; it doesn't use any
	more unmanaged resources anymore, so it's not necessary.  Move all
	the DBusObjectPathVTable stuff out of here.
	(Handler): Save references to our delegates so that they don't get
	finalized.  Call Connection.RegisterObjectPath() instead of
	dbus_connection_register_object_path() directly.
	(Message_Called): Dispose the message after we're finished with
	it.

	* mono/Message.cs (Message): Implement IDisposable.
	(Dispose): Dispose the Arguments, and set the RawMessage to
	IntPtr.Zero.
	(SendWithReplyAndBlock): We own the ref to the reply that comes
	back from dbus_connection_send_with_reply_and_block() so add a
	comment about that and unref it after we've constructed a managed
	MethodReturn class around it.  Fixes a big, big leak.

	* mono/ProxyBuilder.cs: Reflect into Message to get the Dispose
	method.
	(BuildSignalHandler): After we've sent the Signal message, dispose
	of it.
	(BuildMethod): Dispose of the method call and reply messages after
	we've sent the message and extracted the data we want from the
	reply.

	* mono/Service.cs (UnregisterObject): Don't call handler.Dispose()
	anymore.
	(Service_FilterCalled): Dispose of the message after we're
	finished with it.
2005-03-09 04:36:15 +00:00
Owen Fraser-Green
45277e93d8 Added signal support. 2004-03-26 15:25:59 +00:00
Owen Fraser-Green
a745a709d0 Fixed bug preventing creating multiple proxy objects of the same type. 2004-03-24 14:42:41 +00:00
Owen Fraser-Green
f334538967 Made all DBusTypes take Service in the constructor because Array also needed it in the case of an array of OBJECT_PATH objects. 2004-03-24 13:15:20 +00:00
Owen Fraser-Green
632d54e0db Added InterfaceProxy to Mono bindings to avoid having to generate a proxy for every registered object. Also added object_path functions to dbus-message. 2004-03-23 18:07:48 +00:00
Owen Fraser-Green
c916037773 First checkin of the Mono bindings. 2004-03-23 12:10:32 +00:00