Skip to content

Instantly share code, notes, and snippets.

@splhack
Created December 11, 2014 21:31
Show Gist options
  • Select an option

  • Save splhack/4615d0d4b1d131772c78 to your computer and use it in GitHub Desktop.

Select an option

Save splhack/4615d0d4b1d131772c78 to your computer and use it in GitHub Desktop.
#import <Foundation/Foundation.h>
#import <vector>
int main()
{
std::vector<__weak NSObject *> a;
a.push_back([NSObject new]);
a.push_back([NSObject new]);
a.push_back([NSObject new]);
for (auto& v : a) {
NSLog(@"%@", v);
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment