i am not sure. the code works even if i just put GTK.Pixmap(px,bmp); in there. that is, it is not assigned anywhere and should be removed right away.
also, for X to see the image it needs to be moved to the server, where, being an icon, it should remain associated with the window until the client actively replaces it. so garbage collection on the pike side should not influence this.
GTK.Pixmap() does create storage for the image on the server side, and it seems that set_icon() does not although it should.
greetings, martin.