diff options
| author | Rob Arnold <robarnold@cs.cmu.edu> | 2011-06-30 19:27:35 -0700 |
|---|---|---|
| committer | Eric Holk <eholk@mozilla.com> | 2011-07-01 16:59:11 -0700 |
| commit | 4e59b0be544bfda5c533c2024c981861ce012709 (patch) | |
| tree | 2f9941d1e49bb5a26808f26b61d172f29cf3a03b /src/rt/rust_chan.cpp | |
| parent | 02a5949abaa4e888ecb470023ea2f29cd6bde43b (diff) | |
| download | rust-4e59b0be544bfda5c533c2024c981861ce012709.tar.gz rust-4e59b0be544bfda5c533c2024c981861ce012709.zip | |
Sync rust_chan's deref() method with rustc's code.
If the channel is associated with a port then the destructor will assert. Additionally, destruction of the object is not always appropriate. This brings the deref() method into sync with the behavior of generated rust code which only invokes destroy() once the reference count goes to 0.
Diffstat (limited to 'src/rt/rust_chan.cpp')
| -rw-r--r-- | src/rt/rust_chan.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/rt/rust_chan.cpp b/src/rt/rust_chan.cpp index 3065a55e582..78301e3d879 100644 --- a/src/rt/rust_chan.cpp +++ b/src/rt/rust_chan.cpp @@ -7,6 +7,7 @@ rust_chan::rust_chan(rust_task *task, maybe_proxy<rust_port> *port, size_t unit_sz) : + ref_count(1), task(task), port(port), buffer(task, unit_sz) { |
