这是js的。。
Skin.prototype.clear = function () {
this.attachments.length = 0;
this.bones.length = 0;
this.constraints.length = 0;
};
自己仿写了一个clear ,好像有点问题,如何正确清空_attachments?
void Skin::clear(){
_bones.clear();
_constraints.clear();
Skin::AttachmentMap::Entries entries = _attachments.getEntries();
while (entries.hasNext()) {
Skin::AttachmentMap::Entry entry = entries.next();
disposeAttachment(entry._attachment);
}
printf("clear \n");
}