Skip to content

Commit

Permalink
Fix memory leak in FourierBSDFTable
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubhendrich authored and mmp committed Jun 26, 2020
1 parent eff5b43 commit 577d76d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/core/reflection.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,16 @@ struct FourierBSDFTable {
Float *cdf;
Float *recip;

~FourierBSDFTable() {
delete[] mu;
delete[] m;
delete[] aOffset;
delete[] a;
delete[] a0;
delete[] cdf;
delete[] recip;
}

// FourierBSDFTable Public Methods
static bool Read(const std::string &filename, FourierBSDFTable *table);
const Float *GetAk(int offsetI, int offsetO, int *mptr) const {
Expand Down

0 comments on commit 577d76d

Please sign in to comment.