BUG: Fixed memory leak in C++ API when doing indexing
BUG: Fixed memory leak in C++ API when doing indexing

ghisvail/arrayfire,pentschev/arrayfire,asifmadnan/arrayfire,marbre/arrayfire,merlin-ext/arrayfire,ghisvail/arrayfire,hshindo/arrayfire,0x0all/arrayfire,Keno/arrayfire,9prady9/arrayfire,Keno/arrayfire,jramapuram/arrayfire,HolyGeneralK/arrayfire,HolyGeneralK/arrayfire,asifmadnan/arrayfire,linan7788626/arrayfire,unbornchikken/arrayfire,jramapuram/arrayfire,pentschev/arrayfire,unbornchikken/arrayfire,hshindo/arrayfire,umar456/arrayfire,marbre/arrayfire,linan7788626/arrayfire,ghisvail/arrayfire,pavanky/arrayfire,pavanky/arrayfire,0x0all/arrayfire,HolyGeneralK/arrayfire,glehmann/arrayfire,arrayfire/arrayfire,mrgloom/arrayfire,hshindo/arrayfire,9prady9/arrayfire,victorv/arrayfire,munnybearz/arrayfire,pombredanne/arrayfire,unbornchikken/arrayfire,asifmadnan/arrayfire,linan7788626/arrayfire,victorv/arrayfire,umar456/arrayfire,9prady9/arrayfire,shehzan10/arrayfire,umar456/arrayfire,shehzan10/arrayfire,shehzan10/arrayfire,marbre/arrayfire,jramapuram/arrayfire,unbornchikken/arrayfire,munnybearz/arrayfire,Keno/arrayfire,bkloppenborg/arrayfire,HolyGeneralK/arrayfire,pavanky/arrayfire,victorv/arrayfire,arrayfire/arrayfire,pombredanne/arrayfire,9prady9/arrayfire,linan7788626/arrayfire,merlin-ext/arrayfire,umar456/arrayfire,victorv/arrayfire,ghisvail/arrayfire,bkloppenborg/arrayfire,mrgloom/arrayfire,merlin-ext/arrayfire,pentschev/arrayfire,pombredanne/arrayfire,Keno/arrayfire,bkloppenborg/arrayfire,mrgloom/arrayfire,munnybearz/arrayfire,asifmadnan/arrayfire,marbre/arrayfire,jramapuram/arrayfire,pentschev/arrayfire,pombredanne/arrayfire,merlin-ext/arrayfire,shehzan10/arrayfire,arrayfire/arrayfire,hshindo/arrayfire,bkloppenborg/arrayfire,arrayfire/arrayfire,mrgloom/arrayfire,pavanky/arrayfire,glehmann/arrayfire