[Vala] Structs ownership transfer



Hello,
I'd like to discuss about an issue about structs in Vala.
The main problem is with delegates, which don't have a copy method.
Problem is: when a struct is copied, which of the two struct keeps
the real reference to the target?

Current status is that delegate targets aren't even copied,
there's a bug about that.

Reference transfer is currently not supported for structs, and it wouldn't
make sense at all to support it.

Therefore my final stupid proposal is to copy at least the target without the
destroynotify, leaving the user to manually transfer the reference of each
struct field if he wants to.

Hope in a better solution :)

-- 
http://www.debian.org - The Universal Operating System

Attachment: signature.asc
Description: Digital signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]