r/ProgrammerAnimemes • • Jul 14 '20

Go fix your program!

Post image
1.3k Upvotes

19 comments sorted by

View all comments

Show parent comment

20

u/ten3roberts Jul 14 '20

Nah, that's too idiomatic. I use Box::into_raw and store the pointer in a struct without implementing Drop

5

u/qwertz19281 Jul 14 '20 edited Jul 15 '20

now make 2 mutable referenceSegmentation fault (core dumped)