Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/marian-nmt/sentencepiece.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTaku Kudo <taku@google.com>2020-05-18 08:29:36 +0300
committerTaku Kudo <taku@google.com>2020-05-18 08:29:36 +0300
commit8970682ca6828f168909be7bbe701f6905ad123e (patch)
tree590f06a25681fedffa685b3e45c77ee25e04783e /python/sentencepiece_wrap.cxx
parent680c8c6a2af92282fed0f71f422aa4a3a7c7cd2a (diff)
fixed test failure.
Diffstat (limited to 'python/sentencepiece_wrap.cxx')
-rw-r--r--python/sentencepiece_wrap.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/python/sentencepiece_wrap.cxx b/python/sentencepiece_wrap.cxx
index e47b780..3bced05 100644
--- a/python/sentencepiece_wrap.cxx
+++ b/python/sentencepiece_wrap.cxx
@@ -2876,7 +2876,9 @@ class PySentenceIterator : public sentencepiece::SentenceIterator {
CopyValue();
}
- ~PySentenceIterator() {}
+ ~PySentenceIterator() {
+ if (iter_) Py_DECREF(iter_);
+ }
bool done() const override {
return item_ == nullptr;