Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void LocalListUsageExample(int argument)
- {
- NativeList<int> list = new NativeList<int>(Allocator.Temp);
- if(argument == 0)
- {
- list.Dispose();
- return;
- }
- list.Dispose();
- list.Add(argument);
- return;
- }
- void LocalListUsageExample(int argument)
- {
- using(NativeList<int> list = new NativeList<int>(Allocator.Temp))
- {
- if(argument == 0)
- {
- return;
- }
- list.Add(argument);
- return;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment