Просмотр исходного кода

medit displays correct solution when clipping

Former-commit-id: e5a29c32338e517e10f24351419912c2848e725b
Alec Jacobson (jalec 12 лет назад
Родитель
Сommit
ca3f7ffc39
2 измененных файлов с 6 добавлено и 1 удалено
  1. 2 0
      .hgignore
  2. 4 1
      include/igl/matlab/mexStream.h

+ 2 - 0
.hgignore

@@ -5,6 +5,8 @@ syntax: glob
 *.dylib
 *~
 example
+examples/bbw/bbw_demo_selfcontained/*
+examples/bbw/bbw_demo_selfcontained.zip
 example_static
 example_header_only
 example1

+ 4 - 1
include/igl/matlab/mexStream.h

@@ -8,7 +8,10 @@ namespace igl
   //
   // Insert at the beginning of mexFunction():
   //  mexStream mout;
-  //  std::cout.rdbuf(&mout); 
+  //  std::streambuf *outbuf = std::cout.rdbuf(&mout); 
+  //  ...
+  //  ALWAYS restore original buffer to avoid memory leak problems in matlab
+  //  std::cout.rdbuf(outbuf);
   //
   class mexStream : public std::streambuf
   {