Daily iOS
Swift

Implementing copy-on-write

You need a struct ImageBuffer that wraps a large pixel buffer, keeps value semantics, and avoids needless copies. If you implemented copy-on-write yourself, what would the code skeleton and the key API be?

Submit