double **a,*b;
b=new double [n*n];
a=new double *[n];
for(i=0;i<n;i++) a[i]=&b[i*n];

こんなふーに多次元配列を作っているのですが
どんな感じで解放したらいいですか?