- /* VALUE process;
- if (context)
- {
- smx_ctx_ruby_t ctx_ruby = (smx_ctx_ruby_t) context;
-
- if (ctx_ruby->process){
- // if the Ruby Process is Alive , Join it
- // if ( process_isAlive(ctx_ruby->process))
- {
- process = ctx_ruby->process;
- ctx_ruby->process = Qnil;
- process_join(process);
- }
-
+ int i;
+ if (context) {
+ DEBUG1("smx_ctx_ruby_free_context(%p)",context);
+ /* free argv */
+ if (context->argv) {
+ for (i = 0; i < context->argc; i++)
+ if (context->argv[i])
+ free(context->argv[i]);
+
+ free(context->argv);
+ }
+ free (context);
+ context = NULL;