• Igor Wodiany's avatar
    Fix a memory leak in the Mat copying constructor · 37d4e248
    Igor Wodiany authored
    Exception may be rasied inside the body of a copying constructor after
    refcount has been increased, and beacause in the case of the exception
    destrcutor is never called what causes memory leak. This commit adds a
    workaround that calls the release() function before the exception is
    thrown outside the contructor.
    37d4e248
matrix.cpp 119 KB