Ticket #62 (assigned defect)

Opened 4 years ago

Last modified 20 months ago

How to use the Tcl binding so cleanup works

Reported by: schlenk Owned by: olly
Priority: low Milestone:
Component: Xapian-bindings Version: SVN trunk
Severity: trivial Keywords:
Cc: Blocked By:
Operating System: All Blocking:

Description

The current Tcl binding has problems with cleanup, sometimes the destructor does not get called and other nuisances.

I did some small experiments with the binding and found, that the constructor gets called in some cases and not in others:

This works: xapian::WritableDatabase? xapiandb testdir $::xapian::DB_CREATE_OR_OVERWRITE rename xapiandb ""

This seems it does not: xapian::WritableDatabase? xapiandb testdir $::xapian::DB_CREATE_OR_OVERWRITE set db xapiandb $db -delete

neither does this set db [xapian::WritableDatabase xapiandb testdir $::xapian::DB_CREATE_OR_OVERWRITE] $db -delete

or this: set db [xapian::WritableDatabase xapiandb testdir $::xapian::DB_CREATE_OR_OVERWRITE] rename $db ""

I'm not sure if it is a problem with the SWIG wrapping, but thing there are some subtle problems somewhere in there.

Michael

Change History

Changed 3 years ago by olly

It sounds like something isn't quite right inside SWIG, but I don't think I'm qualified to investigate it, since I don't know tcl or the inside of SWIG,

I've added your observations to the tcl bindings documentation, so at least people can work around this problem.

Changed 3 years ago by olly

  • status changed from new to assigned

Changed 20 months ago by olly

  • priority changed from high to low

Changed 20 months ago by trac

  • platform set to All
Note: See TracTickets for help on using tickets.