Why UserClass no extends Sweepable Class?
All UserClass no extends Sweepable class,if I edit source let all classes extends Sweepable,whether affect program?
I have edited source code: src\compiler\statement\Class_Statement.cpp 379 line code: source: cg_printf(" : public ObjectData"); to: cg_printf(" : public ObjectData,public Sweepable");
add after src\compiler\statement\Class_Statement.cpp 592 line code:
//add hiphop __destruct functoin
std::set
change front code ,and then hiphop can let all classess support __desturct function,this way edit code whether affect program?Beacause have edited current program can call function have implement desturct function. so please author give me some suggest ,thanks.
HipHop will call the __destruct method when an object's refcount drops to 0, except for objects that are still live at the end of the request.
Sweepable is used to a different purpose. Sweepable is used to ensure that all native resources (malloc'd memory, file descriptors, etc) are released at the end of the request.
We're closing out all bugs older than 2 months. http://www.hiphop-php.com/wp/?p=575
If this is still an issue, please re-open it, and in order of goodness:
- Give detailed repro steps
- Write a test case in hphp/tests/quick (run it with hphp/tests/run) and send the pull request
- Fix it in a pull request