18 messages in com.mysql.lists.ndb-connectorsRe: lifetime of Ndb and Ndb_cluster_c...| From | Sent On | Attachments |
|---|---|---|
| Mika Raento | 23 Apr 2007 10:32 | |
| Monty Taylor | 23 Apr 2007 11:08 | |
| Monty Taylor | 23 Apr 2007 22:47 | |
| Mika Raento | 23 Apr 2007 23:42 | |
| Monty Taylor | 24 Apr 2007 00:01 | |
| Monty Taylor | 24 Apr 2007 11:40 | |
| Mika Raento | 25 Apr 2007 03:26 | |
| Monty Taylor | 25 Apr 2007 13:58 | |
| Mika Raento | 26 Apr 2007 02:55 | |
| Mika Raento | 26 Apr 2007 05:02 | |
| Mika Raento | 26 Apr 2007 08:36 | .txt |
| Monty Taylor | 27 Apr 2007 13:18 | |
| Monty Taylor | 27 Apr 2007 13:22 | |
| Monty Taylor | 27 Apr 2007 16:23 | |
| Monty Taylor | 30 Apr 2007 11:43 | |
| Mika Raento | 07 May 2007 07:26 | |
| Monty Taylor | 07 May 2007 12:24 | |
| Monty Taylor | 08 May 2007 00:04 |
| Subject: | Re: lifetime of Ndb and Ndb_cluster_connection objects![]() |
|---|---|
| From: | Monty Taylor (mtay...@mysql.com) |
| Date: | 04/27/2007 01:22:48 PM |
| List: | com.mysql.lists.ndb-connectors |
Mika Raento wrote:
Hello
I get crashes in the destructor of Ndb depending a bit on how I declare variables in perl. I think perl doesn't have a deterministic destruction order by declaration order (since it does have reference counting). This means that calls like
my $myNdb = new mysql::cluster::ndbapi::Ndb($connection, "mq_cluster");
So one thing I'm working on right now relates to this. I'm merging code over from NDB/J, and one thing they do is create all new objects through factory methods - even the Ndb_cluster_connection (adding an NdbFactory with a static createNdbClusterConnection() method) I think that once all of that is copied over, it should be easier to indicate to SWIG the ownership and appropriate reference counting of things. So that would become:
my $myNdb = $connection->getNdb("mq_cluster");
Actually, I think getNdb is already there. Then if we do need to put in hints, it will be ones that tell SWIG that $connection owns $myNdb and $connection can't be deleted before $myNdb... but I think SWIG will do this naturally.
-- Monty Taylor Senior Consultant MySQL Inc., www.mysql.com Get More with MySQL! www.mysql.com/consulting





.txt