Check out solutions/reasons from the thread in tesseract-dev forum[1]. [1] https://groups.google.com/forum/#!msg/tesseract-dev/k_bVfoN9_Ss/kUbwvwYCI_EJ
Zdenko On Wed, Dec 11, 2013 at 4:26 PM, <[email protected]> wrote: > I got crash in genericvector.h with C# wrapper for training: *delete[] > data_*; > > All dll are "*release*" type (C# and C++) > > // Clear the array, calling the callback function if any. > template <typename T> > void GenericVector<T>::clear() { > if (size_reserved_ > 0) { > if (clear_cb_ != NULL) > for (int i = 0; i < size_used_; ++i) > clear_cb_->Run(data_[i]); > > > * delete[] data_*; ?????????????????????? > > > data_ = NULL; > size_used_ = 0; > size_reserved_ = 0; > } > if (clear_cb_ != NULL) { > delete clear_cb_; > clear_cb_ = NULL; > } > if (compare_cb_ != NULL) { > delete compare_cb_; > compare_cb_ = NULL; > } > } > > > */////////////////////////////////////////////////////////////////////////////////////////////////////////* > > // Reserve some memory. If the internal array contains elements, they are > // copied. > template <typename T> > void GenericVector<T>::reserve(int size) > { > if (size_reserved_ >= size || size <= 0) > return; > T* new_array = new T[size]; > for (int i = 0; i < size_used_; ++i) > new_array[i] = data_[i]; > > if (data_ != NULL) > { > *delete[] data_*; ????????????????????????? > } > > data_ = new_array; > size_reserved_ = size; > } > > -- > -- > You received this message because you are subscribed to the Google > Groups "tesseract-ocr" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/tesseract-ocr?hl=en > > --- > You received this message because you are subscribed to the Google Groups > "tesseract-ocr" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > -- -- You received this message because you are subscribed to the Google Groups "tesseract-ocr" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/tesseract-ocr?hl=en --- You received this message because you are subscribed to the Google Groups "tesseract-ocr" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

