0

I develop air extension for ios and mac os x.

I use the same code on ios and mac.

For ios all good.

But on mac - have problems.

In extension I use std::vector. Code example:

vector<Type*>* types;
types = new vector<Type*>();

Type* type = new Type();
types->push_back(type);

Application crashed by line:

types->push_back(type); 

I tried add try/catch block - but application crashed too.

I don't know what wrong. This code is work fine on ios and in console application for mac.

  • Why do you use a pointer to a vector? – alestanis Oct 26 '12 at 09:22
  • Cause otherwise it will be created on program stack. Using pointer ensures that object will be created dynamically on the heap which is more convenient. This should work in my opinion. Did you try to decompile it? It may be associated with managed/unmanaged code security issues. – pro_metedor Oct 26 '12 at 10:21
  • No, I did not try to decompile. I think problem with AIR adt packager. – Alexey Babichev Oct 26 '12 at 11:04

0 Answers0