mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 18:31:55 -04:00
need a destructor to fix a major file handle leak!
This commit is contained in:
parent
05ff620572
commit
08693413e8
@ -26,6 +26,16 @@ DatagramInputFile() {
|
|||||||
_owns_in = false;
|
_owns_in = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
// Function: DatagramInputFile::Destructor
|
||||||
|
// Access: Published
|
||||||
|
// Description:
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
INLINE DatagramInputFile::
|
||||||
|
~DatagramInputFile() {
|
||||||
|
close();
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: DatagramInputFile::open
|
// Function: DatagramInputFile::open
|
||||||
// Access: Published
|
// Access: Published
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
class EXPCL_PANDA_PUTIL DatagramInputFile : public DatagramGenerator {
|
class EXPCL_PANDA_PUTIL DatagramInputFile : public DatagramGenerator {
|
||||||
PUBLISHED:
|
PUBLISHED:
|
||||||
INLINE DatagramInputFile();
|
INLINE DatagramInputFile();
|
||||||
|
INLINE ~DatagramInputFile();
|
||||||
|
|
||||||
bool open(const FileReference *file);
|
bool open(const FileReference *file);
|
||||||
INLINE bool open(const Filename &filename);
|
INLINE bool open(const Filename &filename);
|
||||||
|
@ -26,6 +26,16 @@ DatagramOutputFile() {
|
|||||||
_owns_out = false;
|
_owns_out = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
// Function: DatagramOutputFile::Destructor
|
||||||
|
// Access: Public
|
||||||
|
// Description:
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
INLINE DatagramOutputFile::
|
||||||
|
~DatagramOutputFile() {
|
||||||
|
close();
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: DatagramOutputFile::open
|
// Function: DatagramOutputFile::open
|
||||||
// Access: Published
|
// Access: Published
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
class EXPCL_PANDA_PUTIL DatagramOutputFile : public DatagramSink {
|
class EXPCL_PANDA_PUTIL DatagramOutputFile : public DatagramSink {
|
||||||
public:
|
public:
|
||||||
INLINE DatagramOutputFile();
|
INLINE DatagramOutputFile();
|
||||||
|
INLINE ~DatagramOutputFile();
|
||||||
|
|
||||||
bool open(const FileReference *file);
|
bool open(const FileReference *file);
|
||||||
INLINE bool open(const Filename &filename);
|
INLINE bool open(const Filename &filename);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user