I'd also vote against, regardless of how tempting it might sound.
Using AI as inspiration or as lightning quick "seems to work" hack is fine as long as you resist the huge temptation to cut-copy-paste any single line of code you do not fully understand. Remember: As soon as you change/add anything, the responsability and maintenance becomes essentially yours, not the AI's.
Before adding yet more cruft, I'd favour fixing bugs in cb.
Finding potential memory leaks in cb can be done on Linux with e.g. cppcheck, scan-build, heaptrack or valgrind --- or just look for raw new in the editor and you'll quickly find a few good candidates.
Use a more modern programming style and you put in hardly any leak in the first place. Granted, legacy frameworks may limit its scope.