Calling calclFreeObject after invoking calclLink is not a problem.
On a related note, can I use amuasm to read in an IL file and generate a CALimage buffer suitable for reading with calImageRead? I don't want the hassle of linking with the calcl runtime just to compile and link the object code.
My intention is to somehow (maybe using amuasm) turn IL into a GPU-specific ISA and then read the file into a buffer. I can then pass the buffer to calImageRead as a CALimage. The amuasm tool is not well documented but it does accept a GPU target, leading me to believe it can parse IL as input.
Is that doable? Sorry, but I can't actually test any of this due to the lack of GPU support across RDP.