This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
include <gcj/cni.h> #include <stdio.h> #include "HelloWorld.h"
void HelloWorld::print() { printf("Hello, world from CNI!\n");
void *alloc = new char[1024]; }
Presumably "alloc" is going to be leaked, correct?
Is the correct thing to do to put the deallocation stuff into the destructor for the HelloWorld class? Would my destructor then get called at some point?
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |