Skip to content

Commit

Permalink
Add changelog entry
Browse files Browse the repository at this point in the history
  • Loading branch information
madsmtm committed Jun 15, 2022
1 parent e6e1193 commit 03c171c
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions objc2/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,26 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## Unreleased - YYYY-MM-DD

### Added
* Added `msg_send_id!` to help with following Objective-C's memory management
rules. **It is highly recommended that you use this instead of doing memory
management yourself!**

Example:
```rust
// Before
let obj: Id<Object, Shared> = unsafe {
let obj: *mut Self = msg_send![Self::class(), alloc];
let obj: *mut Self = msg_send![obj, init];
Id::new(obj).unwrap()
};

// After
let obj: Id<Object, Shared> = unsafe {
msg_send_id![msg_send_id![Self::class(), alloc], new].unwrap()
};
```


## 0.3.0-beta.0 - 2022-06-13

Expand Down

0 comments on commit 03c171c

Please sign in to comment.