destroy.carbon 502 B

12345678910111213141516
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. package Core library "prelude/destroy";
  5. // TODO: Add `Destructor`, as in:
  6. // interface Destructor {
  7. // private fn Op[ref self: Self]();
  8. // }
  9. // Destroys objects. This will invoke `Destructor` impls recursively on members;
  10. // it does not deallocate memory.
  11. interface Destroy {
  12. fn Op[ref self: Self]();
  13. }